这是 Css 代码...抱歉,由于客户端,我无法共享整个代码。
这在除 safari 之外的所有浏览器中都能完美运行……当我在 safari 中提供margin-top
此功能时px
,但我希望它在 %age 中。问题在于#slide-txt4, #fifth-slide, #slide-txt5
这三个id
有问题......在野生动物园中也可以休息。我尝试使用萤火虫,发现问题出在边距顶部。请帮忙!
#wrapper {
clear: both;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
.container {
clear: both;
float: left;
width: 100%;
}
.slides {
background: none repeat scroll 0 0 #FFFFFF;
margin-top:79px;
position:relative;
}
.slides img {
position: absolute;
cursor:pointer;
}
.slides h1 {
position: absolute;
z-index: 1;
font-size: 72px;
font-weight: normal;
line-height: 57px;
cursor:pointer;
}
#first-slide {
left: 0;
width: 36%;
}
#slide-txt1 {
margin-left: 1.5%;
margin-top: 16%;
width: 302px;
word-wrap: break-word;
}
#second-slide {
left: 29.7%;
width: 41.8%;
}
#slide-txt2 {
margin-left: 38%;
margin-top: 3.7%;
width: 240px;
word-wrap: break-word;
}
#third-slide {
right: 0;
width: 34.4%;
}
#slide-txt3 {
margin-right: 1%;
margin-top: 27.6%;
right: 0;
width: 248px;
word-wrap: break-word;
}
#forth-slide {
left: 0;
margin-top: 39.8%;
position: relative;
width: 51%;
z-index: 0;
}
#slide-txt4 {
margin-left: 1.5%;
margin-top: 42.3%;
width: 294px;
word-wrap: break-word;
}
#fifth-slide {
margin-top: 39.8%;
right: 0;
width: 53.2%;
z-index: 0;
}
#slide-txt5 {
margin-right: 1%;
margin-top: 43%;
right: 0;
}