Html img和文本垂直对齐 这是一个句子。 .卡片{ 利润率:5px14px; 边框:淡蓝色; } .声音{ 宽度:32px; 高度:32px; 光标:指针; } .txt{ 显示:内联块; 左边距:25px; 垂直对齐:中间;//不起作用 边框:薄而实的红色; }
如何将Html img和文本垂直对齐 这是一个句子。 .卡片{ 利润率:5px14px; 边框:淡蓝色; } .声音{ 宽度:32px; 高度:32px; 光标:指针; } .txt{ 显示:内联块; 左边距:25px; 垂直对齐:中间;//不起作用 边框:薄而实的红色; },html,css,Html,Css,如何将.txtdiv对齐到.sound图像的中间? 小提琴是垂直对齐的。声音 <div class="card"> <img class='sound' src='https://www.google.com/images/srpr/logo4w.png'> <div class='txt'> this is a sentence.this is a sentencethis is a sentence. </div></div>
.txt
div对齐到.sound
图像的中间?
小提琴是垂直对齐的。
声音
<div class="card">
<img class='sound' src='https://www.google.com/images/srpr/logo4w.png'>
<div class='txt'>
this is a sentence.this is a sentencethis is a sentence.
</div></div>
.card{
margin:5px 14px;
border:thin solid blue;
}
.sound{
width:32px;
height:32px;
cursor:pointer;
}
.txt{
display:inline-block;
margin-left:25px;
vertical-align:middle; //doesn't work
border:thin solid red;
}
将垂直对齐置于
上。声音
<div class="card">
<img class='sound' src='https://www.google.com/images/srpr/logo4w.png'>
<div class='txt'>
this is a sentence.this is a sentencethis is a sentence.
</div></div>
.card{
margin:5px 14px;
border:thin solid blue;
}
.sound{
width:32px;
height:32px;
cursor:pointer;
}
.txt{
display:inline-block;
margin-left:25px;
vertical-align:middle; //doesn't work
border:thin solid red;
}
将
垂直对齐:中间插入课堂声音
.card{
margin:5px 14px;
border:thin solid blue;
}
.sound{
width:32px;
height:32px;
cursor:pointer;
vertical-align:middle;
}
.txt{
display:inline-block;
margin-left:25px;
border:thin solid red;
}
将垂直对齐:中间插入课堂声音
.card{
margin:5px 14px;
border:thin solid blue;
}
.sound{
width:32px;
height:32px;
cursor:pointer;
vertical-align:middle;
}
.txt{
display:inline-block;
margin-left:25px;
border:thin solid red;
}
应该是开着的,好吗
应该打开。声音已解决,感谢所有人已解决,感谢所有人