課程
/前端開(kāi)發(fā)
/HTML/CSS
/十天精通CSS3
比較復(fù)雜,先在這里碼一下
2014-12-26
源自:十天精通CSS3 9-10
正在回答
<!doctype html>
<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>制作3D旋轉(zhuǎn)導(dǎo)航</title>
<style>
? ? ? ? @import url("http://www.w3cplus.com/demo/css3/base.css");
? ? ? ? /*任務(wù)一:引入本地字體文件*/
? ? ? ? @font-face{
? ? ? ? ?font-family: 'sansationregular';
? ? ? ? ?src:url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.eot');
src: url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.eot?#iefix') format('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/embedded-opentype'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.woff') format('woff'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.ttf') format('truetype'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.svg#sansationregular') format('svg');
font-weight: normal;
font-style: normal;
? ? ? ? }
? ? ? ? body {
? ? ? ? ?background-color:#edecec;
? ? ? ??
? ? ? ? /* basic menu styles */
? ? ? ? .nav-menu {
? ? ? ? ? display: block;
? ? ? ? ?background: #74adaa;
? ? ? ? ?width:950px;
? ? ? ? ?margin: 50px auto 150px;
? ? ? ? .nav-menu > li {
? ? ? ? ? display: inline;
? ? ? ? ? float:left;
? ? ? ? ?border-right:1px solid #94c0be;
? ? ? ? .nav-menu > li:last-child {
? ? ? ? ? border-right: none;
? ? ? ? .nav-menu li a {
? ? ? ? ? color: #fff;
? ? ? ? ?display: block;
? ? ? ? ?text-decoration: none;
? ? ? ? ? /*調(diào)用本地字體*/
? ? ? ? ? -webkit-font-smoothing: antialiased;
? ? ? ? ?-moz-font-smoothing: antialiased;
? ? ? ? ?font-smoothing: antialiased;
? ? ? ? ?text-transform: capitalize;
? ? ? ? ?overflow: visible;
? ? ? ? ?line-height: 20px;
? ? ? ? ?font-size: 20px;
? ? ? ? ?padding: 15px 30px 15px 31px;
? ? ? ? .three-d {
? ? ? ? ? /* 任務(wù)三、設(shè)置3D舞臺(tái)布景 */
? ? ? ? ?perspective:200px;
? ? ? ? ?-o-perspective:200px;
? ? ? ? ?-webkit-perspective:200px;
? ? ? ? ?-moz-perspective:200px;
? ? ? ? ?-ms-perspective:200px;
? ? ? ? ? /*任務(wù)四、設(shè)置3D舞臺(tái)布景過(guò)渡效果*/
? ? ? ? ?transition:all 0.7s linear;
? ? ? ? ?-o-transition:all 0.7s linear;
? ? ? ? ?-ms-transition:all 0.7s linear;
? ? ? ? ?-moz-transition:all 0.7s linear;
? ? ? ? ?-webkit-transition:all 0.7s linear;
? ? ? ? ? position: relative;
? ? ? ? .three-d:not(.active):hover {
? ? ? ? ? cursor: pointer;
? ? ? ? /*任務(wù)五、給不是當(dāng)前狀態(tài)的3D舞臺(tái)的懸浮與聚焦?fàn)顟B(tài)設(shè)置變形效果*/
? ? ? ? .three-d:not(.active):hover .three-d-box,?
? ? ? ? .three-d:not(.active):focus .three-d-box {
? ? ? ? ?transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-o-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-ms-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-moz-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-webkit-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? .three-d-box {
? ? ? ? ? /*任務(wù)六、給3D舞臺(tái)中“.three-d-box”設(shè)置過(guò)渡與變形效果*/
transform:translateZ(-25px);
? ? ? ? ?-o-transform:translateZ(-25px);
? ? ? ? ?-ms-transform:translateZ(-25px);
? ? ? ? ?-moz-transform:translateZ(-25px);
? ? ? ? ?-webkit-transform:translateZ(-25px);
? ? ? ? ?transition:all .3s ease-out;
? ? ? ? ?-o-transition:all .3s ease-out;
? ? ? ? ?-ms-transition:all .3s ease-out;
? ? ? ? ?-moz-transition:all .3s ease-out;
? ? ? ? ?-webkit-transition:all .3s ease-out;
? ? ? ? ? -webkit-transform-style: preserve-3d;
? ? ? ? ? -moz-transform-style: preserve-3d;
? ? ? ? ? -ms-transform-style: preserve-3d;
? ? ? ? ? -o-transform-style: preserve-3d;
? ? ? ? ? transform-style: preserve-3d;
? ? ? ? ? -webkit-pointer-events: none;
? ? ? ? ? -moz-pointer-events: none;
? ? ? ? ? -ms-pointer-events: none;
? ? ? ? ? -o-pointer-events: none;
? ? ? ? ? pointer-events: none;
? ? ? ? ? position: absolute;
? ? ? ? ? top: 0;
? ? ? ? ?left: 0;
? ? ? ? ?width: 100%;
? ? ? ? ?height: 100%;
? ? ? ? /*任務(wù)七、給導(dǎo)航設(shè)置3D前,與3D后變形效果*/
? ? ? ? .front {
? ? ? ? ?transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-ms-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-o-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-moz-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-webkit-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?}
? ? ? ? .back {
? ? ? ? ?transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-ms-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-o-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-moz-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-webkit-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ? color: #FFE7C4;
? ? ? ? .front, .back {
? ? ? ? ?position: absolute;
? ? ? ? ?top: 0;
? ? ? ? ?color: white;
? ? ? ? ?-webkit-pointer-events: none;
? ? ? ? ? -webkit-box-sizing: border-box;
? ? ? ? ? box-sizing: border-box;
? ? ? ? /*任務(wù)八、設(shè)置導(dǎo)航當(dāng)前狀態(tài)與懸浮狀態(tài)下的背景效果*/
? ? ? ? .nav-menu li .active .front,
? ? ? ? .nav-menu li .active .back,
? ? ? ? .nav-menu li a:hover .front,
? ? ? ? .nav-menu li a:hover .back {
? ? ? ? ?background-color: #51938F;
? ? ? ? ?background-size: 5px 5px;
? ? ? ? ?background-position: 0 0, 30px 30px;
? ? ? ? ?background-image: -webit-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: -moz-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
background-image: -ms-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: -o-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
? ? ? ? ?/*background-image: -webkit-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-ms-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-moz-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-o-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238);*/
? ? ? ? .nav-menu ul {
? ? ? ? ?text-align: left;
? ? ? ? ?line-height: 40px;
? ? ? ? ?font-size: 14px;
? ? ? ? ?width: 200px;
? ? ? ? ?-webkit-transition: all 0.3s ease-in;
? ? ? ? ? -moz-transition: all 0.3s ease-in;
? ? ? ? ? -ms-transition: all 0.3s ease-in;
? ? ? ? ? -o-transition: all 0.3s ease-in;
? ? ? ? ? transition: all 0.3s ease-in;
? ? ? ? ? -webkit-transform-origin: 0px 0px;
? ? ? ? ? -moz-transform-origin: 0px 0px;
? ? ? ? ? -ms-transform-origin: 0px 0px;
? ? ? ? ? -o-transform-origin: 0px 0px;
? ? ? ? ? transform-origin: 0px 0px;
? ? ? ? ? -webkit-transform: rotateX(-90deg);
? ? ? ? ? -moz-transform: rotateX(-90deg);
? ? ? ? ? -ms-transform: rotateX(-90deg);
? ? ? ? ? -o-transform: rotateX(-90deg);
? ? ? ? ? transform: rotateX(-90deg);
? ? ? ? ? -webkit-backface-visibility: hidden;
? ? ? ? ? -moz-backface-visibility: hidden;
? ? ? ? ? -ms-backface-visibility: hidden;
? ? ? ? ? -o-backface-visibility: hidden;
? ? ? ? ?backface-visibility: hidden;
? ? ? ? /*任務(wù)九、顯示下拉導(dǎo)航菜單,并其設(shè)置一個(gè)變形效果*/
? ? ? ? .nav-menu > li:hover ul {
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg); ? ? ? ? ?
</style>
</head>
<body>
<div id="nav">
<ul class="nav-menu clearfix unstyled">
<li><a href="#" class="three-d active">
Home
<span><span>Home</span><span>Home</span></span>
</a></li>
<li><a href="#">
Services
<span><span>Services</span><span>Services</span></span>
Products
<span><span>Products</span><span>Products</span></span>
About
<span><span>About</span><span>About</span></span>
Contact
<span><span>Contact</span><span>Contact</span></span>
Blog
<span><span>Blog</span><span>Blog</span></span></a>
<ul class="clearfix unstyled drop-menu">
Html5
<span><span>Html5</span><span>Html5</span></span>
Css3
<span><span>Css3</span><span>Css3</span></span>
JavaScript
<span><span>JavaScript</span><span>JavaScript</span></span>
Videogames
<span><span>Videogames</span><span>Videogames</span></span>
</ul>
</li>
Shop On-line
<span><span>Shop On-line</span><span>Shop On-line</span></span>
</div>
</body>
</html>
舉報(bào)
本課程為CSS3入門(mén)教程,深刻詳解CSS3知識(shí)讓網(wǎng)頁(yè)穿上絢麗裝備
4 回答先在這里馬一下?。?!
1 回答感覺(jué)這種比較難,馬一下
1 回答好復(fù)雜。。。
1 回答偽類(lèi)的權(quán)值是不是比較低?
2 回答感覺(jué)這個(gè)練習(xí)題是不是放在選擇器那章以后比較合適。
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-01-15
<!doctype html>
<html>
<head>
? ? <meta charset="UTF-8">
? ? <title>制作3D旋轉(zhuǎn)導(dǎo)航</title>
<style>
? ? ? ? @import url("http://www.w3cplus.com/demo/css3/base.css");
? ? ? ? /*任務(wù)一:引入本地字體文件*/
? ? ? ? @font-face{
? ? ? ? ?font-family: 'sansationregular';
? ? ? ? ?src:url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.eot');
src: url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.eot?#iefix') format('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/embedded-opentype'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.woff') format('woff'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.ttf') format('truetype'),
url('http://www.w3cplus.com/demo/css3/3DAnimationDropdownMenu/sansation_regular-webfont.svg#sansationregular') format('svg');
font-weight: normal;
font-style: normal;
? ? ? ? }
? ? ? ? body {
? ? ? ? ?background-color:#edecec;
? ? ? ? }
? ? ? ??
? ? ? ? /* basic menu styles */
? ? ? ? .nav-menu {
? ? ? ? ? display: block;
? ? ? ? ?background: #74adaa;
? ? ? ? ?width:950px;
? ? ? ? ?margin: 50px auto 150px;
? ? ? ? }
? ? ? ? .nav-menu > li {
? ? ? ? ? display: inline;
? ? ? ? ? float:left;
? ? ? ? ?border-right:1px solid #94c0be;
? ? ? ? }
? ? ? ? .nav-menu > li:last-child {
? ? ? ? ? border-right: none;
? ? ? ? }
? ? ? ? .nav-menu li a {
? ? ? ? ? color: #fff;
? ? ? ? ?display: block;
? ? ? ? ?text-decoration: none;
? ? ? ? ? /*調(diào)用本地字體*/
? ? ? ? ?font-family: 'sansationregular';
? ? ? ? ? -webkit-font-smoothing: antialiased;
? ? ? ? ?-moz-font-smoothing: antialiased;
? ? ? ? ?font-smoothing: antialiased;
? ? ? ? ?text-transform: capitalize;
? ? ? ? ?overflow: visible;
? ? ? ? ?line-height: 20px;
? ? ? ? ?font-size: 20px;
? ? ? ? ?padding: 15px 30px 15px 31px;
? ? ? ? }
? ? ? ??
? ? ? ??
? ? ? ? .three-d {
? ? ? ? ? /* 任務(wù)三、設(shè)置3D舞臺(tái)布景 */
? ? ? ? ?perspective:200px;
? ? ? ? ?-o-perspective:200px;
? ? ? ? ?-webkit-perspective:200px;
? ? ? ? ?-moz-perspective:200px;
? ? ? ? ?-ms-perspective:200px;
? ? ? ? ? /*任務(wù)四、設(shè)置3D舞臺(tái)布景過(guò)渡效果*/
? ? ? ? ?transition:all 0.7s linear;
? ? ? ? ?-o-transition:all 0.7s linear;
? ? ? ? ?-ms-transition:all 0.7s linear;
? ? ? ? ?-moz-transition:all 0.7s linear;
? ? ? ? ?-webkit-transition:all 0.7s linear;
? ? ? ? ? position: relative;
? ? ? ? }
? ? ? ??
? ? ? ? .three-d:not(.active):hover {
? ? ? ? ? cursor: pointer;
? ? ? ? }
? ? ? ??
? ? ? ? /*任務(wù)五、給不是當(dāng)前狀態(tài)的3D舞臺(tái)的懸浮與聚焦?fàn)顟B(tài)設(shè)置變形效果*/
? ? ? ? .three-d:not(.active):hover .three-d-box,?
? ? ? ? .three-d:not(.active):focus .three-d-box {
? ? ? ? ?transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-o-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-ms-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-moz-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? ?-webkit-transform:translateZ(-25px) rotateX(90deg);
? ? ? ? }
? ? ? ??
? ? ? ? .three-d-box {
? ? ? ? ? /*任務(wù)六、給3D舞臺(tái)中“.three-d-box”設(shè)置過(guò)渡與變形效果*/
transform:translateZ(-25px);
? ? ? ? ?-o-transform:translateZ(-25px);
? ? ? ? ?-ms-transform:translateZ(-25px);
? ? ? ? ?-moz-transform:translateZ(-25px);
? ? ? ? ?-webkit-transform:translateZ(-25px);
? ? ? ? ?transition:all .3s ease-out;
? ? ? ? ?-o-transition:all .3s ease-out;
? ? ? ? ?-ms-transition:all .3s ease-out;
? ? ? ? ?-moz-transition:all .3s ease-out;
? ? ? ? ?-webkit-transition:all .3s ease-out;
? ? ? ? ? -webkit-transform-style: preserve-3d;
? ? ? ? ? -moz-transform-style: preserve-3d;
? ? ? ? ? -ms-transform-style: preserve-3d;
? ? ? ? ? -o-transform-style: preserve-3d;
? ? ? ? ? transform-style: preserve-3d;
? ? ? ? ? -webkit-pointer-events: none;
? ? ? ? ? -moz-pointer-events: none;
? ? ? ? ? -ms-pointer-events: none;
? ? ? ? ? -o-pointer-events: none;
? ? ? ? ? pointer-events: none;
? ? ? ? ? position: absolute;
? ? ? ? ? top: 0;
? ? ? ? ?left: 0;
? ? ? ? ?display: block;
? ? ? ? ?width: 100%;
? ? ? ? ?height: 100%;
? ? ? ? }
? ? ? ??
? ? ? ? /*任務(wù)七、給導(dǎo)航設(shè)置3D前,與3D后變形效果*/
? ? ? ? .front {
? ? ? ? ?transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-ms-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-o-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-moz-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?-webkit-transform:rotateX(0deg) translateZ(25px);
? ? ? ? ?}
? ? ? ??
? ? ? ? .back {
? ? ? ? ?transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-ms-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-o-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-moz-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ?-webkit-transform:rotateX(-90deg) translateZ(25px);
? ? ? ? ? color: #FFE7C4;
? ? ? ? }
? ? ? ??
? ? ? ? .front, .back {
? ? ? ? ? display: block;
? ? ? ? ?width: 100%;
? ? ? ? ?height: 100%;
? ? ? ? ?position: absolute;
? ? ? ? ?top: 0;
? ? ? ? ?left: 0;
? ? ? ? ?background: #74adaa;
? ? ? ? ?padding: 15px 30px 15px 31px;
? ? ? ? ?color: white;
? ? ? ? ?-webkit-pointer-events: none;
? ? ? ? ? -moz-pointer-events: none;
? ? ? ? ? -ms-pointer-events: none;
? ? ? ? ? -o-pointer-events: none;
? ? ? ? ? pointer-events: none;
? ? ? ? ? -webkit-box-sizing: border-box;
? ? ? ? ? box-sizing: border-box;
? ? ? ? }
? ? ? ? /*任務(wù)八、設(shè)置導(dǎo)航當(dāng)前狀態(tài)與懸浮狀態(tài)下的背景效果*/
? ? ? ? .nav-menu li .active .front,
? ? ? ? .nav-menu li .active .back,
? ? ? ? .nav-menu li a:hover .front,
? ? ? ? .nav-menu li a:hover .back {
? ? ? ? ?background-color: #51938F;
? ? ? ? ?background-size: 5px 5px;
? ? ? ? ?background-position: 0 0, 30px 30px;
? ? ? ? ?background-image: -webit-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: -moz-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
background-image: -ms-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: -o-linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
?background-image: linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480), linear-gradient(45deg, #478480 25%, transparent 25%, transparent 75%, #478480 75%, #478480);
? ? ? ? ?/*background-image: -webkit-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-ms-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-moz-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),-o-linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238),linear-gradient(45deg,#434238 25%,transparent 25%,transparent 75%,#434238 75%,#434238);*/
? ? ? ? }
? ? ? ? .nav-menu ul {
? ? ? ? ? position: absolute;
? ? ? ? ?text-align: left;
? ? ? ? ?line-height: 40px;
? ? ? ? ?font-size: 14px;
? ? ? ? ?width: 200px;
? ? ? ? ?-webkit-transition: all 0.3s ease-in;
? ? ? ? ? -moz-transition: all 0.3s ease-in;
? ? ? ? ? -ms-transition: all 0.3s ease-in;
? ? ? ? ? -o-transition: all 0.3s ease-in;
? ? ? ? ? transition: all 0.3s ease-in;
? ? ? ? ? -webkit-transform-origin: 0px 0px;
? ? ? ? ? -moz-transform-origin: 0px 0px;
? ? ? ? ? -ms-transform-origin: 0px 0px;
? ? ? ? ? -o-transform-origin: 0px 0px;
? ? ? ? ? transform-origin: 0px 0px;
? ? ? ? ? -webkit-transform: rotateX(-90deg);
? ? ? ? ? -moz-transform: rotateX(-90deg);
? ? ? ? ? -ms-transform: rotateX(-90deg);
? ? ? ? ? -o-transform: rotateX(-90deg);
? ? ? ? ? transform: rotateX(-90deg);
? ? ? ? ? -webkit-backface-visibility: hidden;
? ? ? ? ? -moz-backface-visibility: hidden;
? ? ? ? ? -ms-backface-visibility: hidden;
? ? ? ? ? -o-backface-visibility: hidden;
? ? ? ? ?backface-visibility: hidden;
? ? ? ? }
? ? ? ? /*任務(wù)九、顯示下拉導(dǎo)航菜單,并其設(shè)置一個(gè)變形效果*/
? ? ? ? .nav-menu > li:hover ul {
? ? ? ? ? display: block;
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg); ? ? ? ? ?
? ? ? ? ?}
</style>
</head>
<body>
<div id="nav">
<ul class="nav-menu clearfix unstyled">
<li><a href="#" class="three-d active">
Home
<span><span>Home</span><span>Home</span></span>
</a></li>
<li><a href="#">
Services
<span><span>Services</span><span>Services</span></span>
</a></li>
<li><a href="#">
Products
<span><span>Products</span><span>Products</span></span>
</a></li>
<li><a href="#">
About
<span><span>About</span><span>About</span></span>
</a></li>
<li><a href="#">
Contact
<span><span>Contact</span><span>Contact</span></span>
</a></li>
<li><a href="#">
Blog
<span><span>Blog</span><span>Blog</span></span></a>
<ul class="clearfix unstyled drop-menu">
<li><a href="#">
Html5
<span><span>Html5</span><span>Html5</span></span>
</a></li>
<li><a href="#">
Css3
<span><span>Css3</span><span>Css3</span></span>
</a></li>
<li><a href="#">
JavaScript
<span><span>JavaScript</span><span>JavaScript</span></span>
</a></li>
<li><a href="#">
Videogames
<span><span>Videogames</span><span>Videogames</span></span>
</a></li>
</ul>
</li>
<li><a href="#">
Shop On-line
<span><span>Shop On-line</span><span>Shop On-line</span></span>
</a></li>
</ul>
</div>
</body>
</html>