簡體   English   中英

我在布局上遇到麻煩

[英]I have a trouble with layout

鏈接元素無法正確顯示。 我試圖為其設置一個line-height屬性,但是它沒有用。 而不是這個<li>元素得到了height屬性。

PS對不起我的英語

 footer { width: 100%; background: #eee; position: fixed; bottom: 0; text-align: center; } footer p { line-height: 40px; display: inline-block; margin:25px 20px 25px 0; padding: 0 25px; border-right: 1px solid #aaa; } footer ul { display: inline-block; width: 140px; list-style: none; margin: 25px 0; padding: 0; line-height: 40px; } footer li { display: inline-block; line-height: 40px; } footer a { font-size: 25px; color: #aaa; text-decoration: none; margin: 0 10px; } 
 <footer> <p>Some text</p> <ul> <li><a href="#" class="fab fa-instagram"></a></li> <li><a href="#" class="fab fa-telegram-plane"></a></li> <li><a href="#" class='fab fa-behance'></a></li> </ul> </footer> 

 footer { width: 100%; background: #eee; position: fixed; bottom: 0; text-align: center; } footer p { line-height: 40px; display: inline-block; margin:25px 20px 25px 0; padding: 0 25px; border-right: 1px solid #aaa; } footer ul { display: inline-block; width: 140px; list-style: none; margin: 25px 0; padding: 0; } footer li { display: inline-block; } footer a { font-size: 25px; color: #aaa; text-decoration: none; vertical-align:middle; margin: 0 10px; } 
 <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" rel="stylesheet"/> <footer> <p>Some text</p> <ul> <li><a href="#" class="fab fa-instagram"></a></li> <li><a href="#" class="fab fa-telegram-plane"></a></li> <li><a href="#" class='fab fa-behance'></a></li> </ul> </footer> 
這是你在找什么?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM