时间:2023-10-12 11:48:01 | 来源:网站运营
时间:2023-10-12 11:48:01 来源:网站运营
制作静态网页总结:1.居中问题,一是水平居中,二是垂直居中。.header .header-center .header-nav ul li{ float: left; width: 98px; text-align: center; height: 50px; /*垂直居中*/ line-height: 50px;
2.块元素居中:margin:auto.center .boss .center2 .center-top{ height: 57px; width: 291px;
二,间隙问题.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;
三、背景图片自适应属性background-image: url(image.jpg);background-repeat:no-repeat;
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%;
关键词:总结,静态