[英]How do i make a div to have the same image size in that div? but still have a consistent size for all images across the website?
所以,我有以下權利
#footer {
clear: both;
font-size: .84em;
border-top: 1px solid #ddd;
padding: 20px 0 0;
text-align: right;
}
我想要一種使該div下的所有圖像具有一定大小的方法。
但是我的CSS代碼確實有這個
img {
border-style: none;
border-color: inherit;
border-width: 0;
height: 54px;
width: 57px;
}
當我使用Visual Studios拆分視圖編輯器調整圖像大小時,這會自動發生。 您會發現這很煩人,因為它也更改了頁腳div上的所有圖像大小((開始認為它會更改整個頁面上的所有img大小)),我的社交網絡按鈕最終變得很大! 當我調整頁面正文中圖像的大小時。
我想保持社交媒體按鈕較小,並且我的身體圖像的大小由我設置,例如255px x 225px。
希望我有某種意義。
另外,如果您需要它,這是我的html
<div id="footer">
<p>© Copyright 2014 Music Club − Design: Jade Powell</p>
<img src="/images/facebook128.png" alt="Facebook" />
<img src="/images/twitter128.png" alt="Twitter" />
<img src="/images/google128.png" alt="Google" />
</div>
應該
這將設置#footer
下的所有images
#footer
#footer img {
border-style: none;
border-color: inherit;
border-width: 0;
height: 54px;
width: 57px;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.