(一)水平居中 :

1.行內(nèi)居中:text-align:center

.header .header-center .header-nav ul li{ float: left; width: 98px; text-align: center; heig" />

国产成人精品无码青草_亚洲国产美女精品久久久久∴_欧美人与鲁交大毛片免费_国产果冻豆传媒麻婆精东

15158846557 在線咨詢 在線咨詢
15158846557 在線咨詢
所在位置: 首頁 > 營銷資訊 > 網(wǎng)站運(yùn)營 > 制作靜態(tài)網(wǎng)頁總結(jié)

制作靜態(tài)網(wǎng)頁總結(jié)

時間:2023-10-12 11:48:01 | 來源:網(wǎng)站運(yùn)營

時間:2023-10-12 11:48:01 來源:網(wǎng)站運(yùn)營

制作靜態(tài)網(wǎng)頁總結(jié):1.居中問題,一是水平居中,二是垂直居中。

(一)水平居中 :

1.行內(nèi)居中:text-align:center

.header .header-center .header-nav ul li{ float: left; width: 98px; text-align: center; height: 50px; /*垂直居中*/ line-height: 50px;2.塊元素居中:margin:auto

(二)垂直居中:

1.用line-height

.center .boss .center2 .center-top{ height: 57px; width: 291px;二,間隙問題

display:inline-block將對象呈遞為內(nèi)聯(lián)對象,但是對象的內(nèi)容作為塊對象呈遞。旁邊的內(nèi)聯(lián)對象會被呈遞在同一行內(nèi),允許空格。

.header .header-center .header-logo .logo-right .right2 ul li{ display: inline-block; width: 70px; color: #ff8842; border-right: 2px solid #A7AFC5; margin-right: 10px; cursor: pointer;三、背景圖片自適應(yīng)屬性

1,背景圖片取消重復(fù)

background-image: url(image.jpg);background-repeat:no-repeat;
2,背景圖片固定(不會隨著內(nèi)容滾動而改變位置)

background-image: url(image.jpg);background-attachment:fixed;3,背景圖片居中顯示

background-image: url(image.jpg);background-repeat:no-repeat;background-position:center;4,背景圖片等比例拉伸

background-image: url(image.jpg);background-repeat:no-repeat;background-size: auto 100%;/* background-size: 100% auto; */5,使用 cover 自動等比例拉伸圖片

background-image: url(image.jpg);background-repeat:no-repeat;background-size: cover;6,背景圖片拉伸(會扭曲圖片)

background-image: url(image.jpg);background-repeat:no-repeat;background-size: 100% 100%;

關(guān)鍵詞:總結(jié),靜態(tài)

74
73
25
news

版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。

為了最佳展示效果,本站不支持IE9及以下版本的瀏覽器,建議您使用谷歌Chrome瀏覽器。 點擊下載Chrome瀏覽器
關(guān)閉