我是个新手,所以请尽量低调一点。我正在做这个博客滑块:https://fluoresblog.blogspot.ca/
滑块中的图像被裁剪,而不是居中。我想保持幻灯片的大小,但图像居中。我该怎么做呢?谢谢!
.flexslider ul.slides li .feature_text h2 a {
color: #fff;
line-height: 1.2em;
margin-bottom: 12px;
display: block;
font-family: Raleway;
font-size: 35px;
font-weight: 400;
font-style: normal;
line-height: 1.25;
letter-spacing: 3px;
text-transform: uppercase;
}
.flexslider ul.slides li .feature_text p {
color:#fff;
font-size:15px;
padding:1px 8px;
display:inline-block;
margin-bottom:40px;
}
.flexslider ul.slides li .feature_text span.feature_button {
display:block;
}
.flexslider ul.slides li .feature_text span.feature_button a {
border:3px solid #FFF;
color:#FFF;
padding:11px;
text-transform:uppercase;
font-size:14px;
font-weight:700;
letter-spacing:2px;
font-family:Sans-serif;
-o-transition:.3s;
-ms-transition:.3s;
-moz-transition:.3s;
-webkit-transition:.3s;
transition:.3s;
}
.flexslider ul.slides li .feature_text span.feature_button a:hover {
background:#000;
color:#fff;
border:3px solid #FFF;
}
.flexslider ul.slides li .feature_text span.feature_button a i.fa {
margin-left:1px;
font-size:14px;
}/***弹性滑块图库**/
.flexslider.gallery {
margin-bottom:30px;
}
.flexslider .slides a.thumb {
display:block;
height:540px;
overflow:hidden;
position: relative;
}发布于 2017-11-20 01:55:00
如果你的滑块图片是背景图片,试着将背景位置css属性设置为"center“。
https://stackoverflow.com/questions/47380040
复制相似问题