Html 如何正确显示每个li的图像和文本
如何正确显示带有图像的li文本?我在每个li中都有一个图像和文本。文本位于图像下,但我想更改文本外观,使其不被包装在图像下。我该怎么做Html 如何正确显示每个li的图像和文本,html,css,Html,Css,如何正确显示带有图像的li文本?我在每个li中都有一个图像和文本。文本位于图像下,但我想更改文本外观,使其不被包装在图像下。我该怎么做 这是文本fhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfh。 这是LI文本测试测试测试。 试试我玩的这个代码width calc img{ 垂直对齐:顶部; } 李斯潘{ 宽度:计算(100%-30px); 显示:内联块; } 这是文本fhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfh。 这是LI文
-
这是文本fhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfh。
-
这是LI文本测试测试测试。
试试我玩的这个代码width calc
img{
垂直对齐:顶部;
}
李斯潘{
宽度:计算(100%-30px);
显示:内联块;
}
-
这是文本fhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfh。
-
这是LI文本测试测试测试。
试试:
li{
显示器:flex;
对齐项目:居中;
}
img{
右边距:15px;
自动对齐:灵活启动
}
-
这是文本fhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfhdfh。
-
这是LI文本测试测试测试。
你们想在图像的顶部显示它吗?但图像是从李的中心来的。我想像顶部一样显示顶部zero@cinnan然后将其添加到图像align self:flex start
<ul>
<li>
<img src="http://dropbox.smallparade.com/bigbubble.png" width="24" height="24"> This is thetextfdhdfhdfhdfhdfhdfhd</br>fhdfhdfhdfhdfhdfhdfh.
</li>
<li>
<img src="http://dropbox.smallparade.com/bigbubble.png" width="24" height="24"> This is the LI textTestTestTestTestTestTestTestTestTestTes</br>tTestTestTestTestTestTestTestTestTest.
</li>
</ul>