只是想解決我的圖標我使用列表項中的令人沮喪的問題。當文本換行時,它總是在圖標下面,而不是直接在第一行文本的下面。無法解決發生了什麼事。我曾嘗試在圖標上添加一個高度,但它的功能相同。列表項文本不斷包裝下圖標
希望你能幫上忙。
https://jsfiddle.net/rufusbear/40wr9ngt/
#facts {
padding: 0;
margin: 1% 0 0 0;
list-style: none;
}
#facts li {
margin: 2% 17%;
}
#facts i {
margin-right: 2%;
font-size: 130%;
}
@font-face {
font-family: "Flaticon";
src: url("./Flaticon.eot");
src: url("./Flaticon.eot?#iefix") format("embedded-opentype"), url("./Flaticon.woff") format("woff"), url("./Flaticon.ttf") format("truetype"), url("./Flaticon.svg#Flaticon") format("svg");
font-weight: normal;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
@font-face {
font-family: "Flaticon";
src: url("./Flaticon.svg#Flaticon") format("svg");
}
}
[class^="flaticon-"]:before,
[class*=" flaticon-"]:before,
[class^="flaticon-"]:after,
[class*=" flaticon-"]:after {
font-family: Flaticon;
.font-size: 20px;
font-style: normal;
.margin-left: 20px;
}
.flaticon-apple:before {
content: "\f100";
}
.flaticon-biscuit:before {
content: "\f101";
}
.flaticon-coffee-cup:before {
content: "\f102";
}
.flaticon-film:before {
content: "\f103";
}
.flaticon-gamepad:before {
content: "\f104";
}
.flaticon-lawn-mower:before {
content: "\f105";
}
<ul id="facts">
<li>
<i class="flaticon-coffee-cup"></i>
random text random text random text random text random text
</li>
</ul>
謝謝你的工作,很感謝 – rufus
@rufus歡迎你) –