transform:rotate不起作用

时间:2012-11-12 17:27:35

标签: html css rotation

我的css代码和网页有点问题。

我想创建一个带有不同颜色选项的动画菜单。每个选项都在一个圆圈内,当我的鼠标悬停时,它会旋转并改变背景颜色。 当我使用Mozilla Firefox尝试结果时,它完美无缺。当我尝试使用chrome或IE时,它不起作用。

我发布了3个代码,第一个是CSS,第二个是主要的网页示例,第三个是没有网页主体的菜单(只是菜单类),它甚至可以使用Chrome而不是IE!

我希望你能帮助我!这非常重要!

#green{background-color: #c9f390;}
#orange{background-color: #f9c582;}
#blue{background-color: #bce5f4;}
#yellow{background-color: #effab4;}

#green_t{color: #99b857;}
#orange_t{color: #fc8550;}
#blue_t{color: #7b96fc;}
#yellow_t{color: #f4d884;}

.container_left{
    position: absolute;
    right: 65%;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: -1; 
}
.container_right{
    position: absolute;
    right: 0;
    top: 0;
    left: 35%;
    z-index: -1;
    background-repeat: repeat-y;
}
.content_info{
    padding-top: 20px;
    padding-left: 20px;
    padding-bottom: 20px;
    width: 500px;
    font-family: Tahoma;
    font-size: 13px;
    text-align: justify;
}
.content_menu{
    padding-right: 20px;
    width: 300px;
    font-family: Tahoma;
    font-size: 12px;
    text-align: justify;
}

.piggy{padding-right: 50px;}

.title{
    font-family: 
    Verdana;
    font-size: 40px;
    letter-spacing: 2px;
    text-align: right;
}
.subtitle{
    font-family: Verdana;
    font-size: 20px;
    text-align: left; 
    font-style: italic
}

blockquote{
    color: #878785;
    background-color: #ffffff;
    margin: 10px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;
    padding: 3px 30px 3px 30px;
    font-size: 13px;
    font-family: Tahoma;
}
blockquote p:before {
    color: #000000;
    float: left;
    content: '{';
    font-size: 40px;
    font-family: Georgia;
    margin: 0 0 0 -30px;
}
blockquote p:after {
    color: #000000;
    float: right;
    content: '}';
    font-size: 40px;
    font-family: Georgia;
    margin: -30px -30px 0 0;
}

#pageMenu{
    padding-top: 10px; 
    margin-bottom: 20px; 
}

#pageMenu a.green {background-color: #c9f390;}
#pageMenu a.orange {background-color:#f9c582;}
#pageMenu a.blue {background-color: #bce5f4;}
#pageMenu a.yellow {background-color: #effab4;}
#pageMenu a.grey {background-color: #e1e1e1;}

#pageMenu a {
    height: 50px;
    width: 50px;
    float:left;
    margin-left:10px;
    text-align: center;
    line-height:50px;
    border-radius: 50%;
    -ms-border-radius: 50%;
    -moz-border-radius: 50%;
    -webkit-border-radius: 50%;
    -o-border-radius: 50%;

    transition: all 0.5s ease-in-out;
    -ms-transition: all 0.5s ease-in-out;
    -moz-transition: all 0.5s ease-in-out;
    -webkit-transition: all 0.5s ease-in-out;
    -o-transition: all 0.5s ease-in-out;
}

#pageMenu a:hover {
    background-color: #eca0a0 !important;
    transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
}

#pageMenu img {border: none;margin-top: 10px;}

1

<html>
<head>
<title>Prova</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
<div class="container_left" align="right">
<div class="content_menu">

<div id="pageMenu">
<a class="green" href="">Green</a>
<a class="orange" href="">Orange</a>
<a class="blue" href="">Blue</a>
<a class="yellow" href="">Yellow</a>
<a class="grey" href="">Grey</a>
</div>

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

</div>
</div>

<div id="green" class="container_right">
<div class="content_info">

<div id="green_t" class="title">Titolo</div>
<div class="subtitle">- Sottotitolo</div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.
    <blockquote><p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
    </p></blockquote>

</div>
</div>

</body>
</html>

2

<html>
<head>
<title>Prova2</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

<body>
<div id="pageMenu">
<a class="green" href="">Green</a>
<a class="orange" href="">Orange</a>
<a class="blue" href="">Blue</a>
<a class="yellow" href="">Yellow</a>
<a class="grey" href="">Grey</a>
</div>
</body>
</html>

0 个答案:

没有答案