我有一个jquery手风琴的标题,我已经在我的CSS中旋转到'垂直'。这适用于Chrome,但不适用于Firefox或Internet Explorer?
我尝试添加'!important'但它仍然不会显示旋转?
#contentAccordion{
margin:0 auto;
height:500px;
width: 100%;
}
ul.accordion{
list-style:none;
position:absolute;
left: 1px;
top:0px;
font-family: Cambria, serif;
font-size: 16px;
font-style: italic;
line-height: 1.5em;
width: 100%;
}
ul.accordion li{
float:right;
width:115px;
height:380px;
display:block;
border-right:2px solid #fff;
border-bottom:2px solid #fff;
background-color:#fff;
background-repeat:no-repeat;
background-position:center center;
position:relative;
overflow:hidden;
cursor:pointer;
-moz-box-shadow:1px 3px 15px #555;
-webkit-box-shadow:1px 3px 15px #555;
box-shadow:1px 3px 15px #555;
}
ul.accordion li.bg1{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/air.jpg);
}
ul.accordion li.bg2{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/2.jpg);
}
ul.accordion li.bg3{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/3.jpg);
}
ul.accordion li.bg4{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/4.jpg);
}
ul.accordion li.bg5{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/air.jpg);
}
ul.accordion li.bleft{
border-left:2px solid #fff;
}
ul.accordion li .heading {
background-color: rgba(245, 240, 240, 0.65);
padding: 10px;
margin-top: 250px;
opacity: 0.6;
text-transform: uppercase;
font-style: normal;
font-weight: bold;
letter-spacing: 10px;
font-size: 25px;
color: rgb(12, 11, 11);
text-align: center;
text-shadow: -1px -1px 1px #ccc;
-webkit-transform: translatey(-100%) rotate(-90deg);
line-height: 80px;
height: 80px;
width: 280px;
margin-left: -100px;
}
ul.accordion li .description{
position:absolute;
width:260px;
height:175px;
bottom:0px;
left:0px;
display:none;
}
ul.accordion li .description h2{
text-transform:uppercase;
font-style:normal;
font-weight:bold;
letter-spacing:1px;
font-size:45px;
color:#444;
text-align:left;
margin:0px 0px 15px 20px;
text-shadow:-1px -1px 1px #ccc;
}
ul.accordion li .description p{
line-height:14px;
margin:10px 22px;
font-family: "Trebuchet MS", sans-serif;
font-size: 12px;
font-style: italic;
font-weight: normal;
text-transform: none;
letter-spacing: normal;
line-height: 1.6em;
}
ul.accordion li .description a{
position:absolute;
bottom:5px;
left:20px;
text-transform:uppercase;
font-style:normal;
font-size:11px;
text-decoration:none;
color:#888;
}
ul.accordion li .description a:hover{
color:#333;
text-decoration:underline;
}
ul.accordion li .bgDescription{
background:transparent url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/bgDescription.png) repeat-x top left;
height:340px;
position:absolute;
bottom:0px;
left:0px;
width:260px;
display:none;
}
/* Vertical Accordion Style */
.container {
width:100% !important;
position:relative;
margin:40px auto 0 auto;
top: -17px;
left: 0px;
}
.va-wrapper{
width:100%;
height:100%;
position:absolute;
overflow:hidden;
background:#000;
left: 0px;
}
.va-slice{
cursor:pointer;
position:absolute;
width:100%;
left:0px;
overflow:hidden;
}
.va-slice-1{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Airfreight10.png) no-repeat center center;
}
.va-slice-2{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Seafreight2.png) no-repeat center center;
}
.va-slice-3{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Satellite.png) no-repeat center center;
}
.va-slice-4{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Guarding11.png) no-repeat center center;
}
.va-slice-5{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Move3.png) no-repeat center center;
}
.va-slice-6{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/Investigations2.png) no-repeat center center;
}
.va-slice-7{
background:#000 url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/transport2.png) no-repeat center center;
}
.va-slice-color-1{
background-color:#97c5eb;
}
.va-slice-color-2{
background-color:#68ace5;
}
.va-slice-color-3{
background-color:#0072cf;
}
.va-slice-color-4{
background-color:#0039a6;
}
.va-slice-color-5{
background-color:#00338e;
}
.va-slice-color-6{
background-color:#002c76;
}
.va-slice-color-7{
background-color:#002144;
}
.va-title{
font-family: 'Open Sans Condensed', sans-serif;
text-transform:uppercase;
font-size:40px;
margin-left:20px;
color:#fff;
text-shadow: 0px 0px 1px white;
}
.va-content{
display:none;
margin-left:25px;
}
.va-slice p{
font-size: 22px;
font-style: italic;
font-family:Georgia, serif;
}
.va-slice ul{
margin-top:20px;
}
.va-slice ul li{
float:left;
margin:0px 2px;
}
.va-slice ul li a{
color:#000;
background:#eede2f;
padding:3px 6px;
font-size:14px;
font-family:'PT Sans', sans-serif;
text-transform:uppercase;
}
.va-slice ul li a:hover{
background:#000;
color:#fff;
text-shadow:none;
}
.va-nav span{
width:40px;
height:25px;
background:transparent url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/prev.png) no-repeat center center;
position:absolute;
top:-35px;
left:50%;
margin-left:-20px;
text-indent:-9000px;
opacity:0.7;
cursor:pointer;
z-index:100;
}
.va-nav span.va-nav-next{
background-image:url(http://www.fsi.lookinside.co.za/wp-content/uploads/2013/04/next.png);
top:auto;
bottom:-35px;
}
.va-nav span:hover{
opacity:1.0;
}
答案 0 :(得分:1)
您只能使用-webkit-transform: translatey(-100%) rotate(-90deg);
您忘记了其他供应商前缀:firefox为-moz-
,IE为-ms-
等...
如果您想知道哪些浏览器支持属性:http://caniuse.com/#search=transform 显然,你不需要该属性的-moz-前缀,Firefox已经实现了它。
最佳做法:始终在底部定义不带供应商前缀的规则:
-webkit-transform: translatey(-100%) rotate(-90deg);
transform: translatey(-100%) rotate(-90deg);
这样,即使浏览器删除了它的前缀支持,它仍将在未来工作。