用纯css3绘制的能自适应浏览器的哆啦a梦动画

最近在研究用css3绘制矢量图,于是就用纯css3绘制了能自适应浏览器宽度的哆啦a梦动画,兼容css3的浏览器都可以正常观看,下面只是网页截图:

废话不多说了,直接给代码。

html 代码:

<div class="dlam" title="用纯css3绘制的能自适应浏览器的哆啦a梦动画">

    <div class="bozi">
        <div class="lingdan">
            <div class="shudiao"></div>
        </div>
    </div>
    <div class="top">
         <div class="top-lian">
              <div class="top-yan1"><div class="p1"></div></div>
           <div class="top-yan2"><div class="p2"></div></div>
              <div class="top-bi1"></div>
              <div class="bixian"> <div class="bixian2"></div></div>
              <div class="top-zui">
                    <div class="top-zui2">
                            <div class="top-bi2"></div>
                    </div>
              </div>
              <div class="mao1"></div>
              <div class="mao2"></div>
              <div class="mao3"></div>
              <div class="mao4"></div>
              <div class="mao5"></div>
              <div class="mao6"></div>
         </div>
    </div>

  <div class="shengti">
    <div class="shoubi1"><div class="ctou1"></div></div>
          <div class="duzi">
                <div class="koudai"><div class="xiaokoudai"></div></div>
    </div>
          <div class="shoubi2"><div class="ctou2"></div></div>
    <div class="jiao1"><div class="jiaozi"></div></div>
    <div class="jiao2"><div class="jiaozi"></div></div>
  </div>

</div>

css 代码:

@media screen and (max-width: 400px) {
.dlam {width: 200px;height:325px;} 

}

@media screen and (min-width: 400px) {
.dlam {width: 200px;height:325px;}

}
@media screen and (min-width: 600px) {
.dlam {width: 300px;height:487.5px;}

}

@media screen and (min-width: 1000px) {
.dlam {width: 400px;height:650px;}

}

@media screen and (min-width: 2000px) {
.dlam {width: 500px;height:778.5px;}

}
.dlam {

    border: 1px dashed #0C9;

    min-width: 200px;
    min-height: 325px;
    margin-top: 50px;
    margin-right: auto;
    margin-left: auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0px 0px 3px 0px #3399CC;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
}
.top {
    cursor: pointer;
    height: 45%;
    width: 80%;
    position: relative;
    border: 2px solid #007EA8;
    border-radius: 9999px;
    left: 8.8%;
    top: 0%;
    background-color: #39C;
    overflow: hidden;
}
.top-lian {
    height: 80%;
    width: 80%;
    border: 2px solid #007EA8;
    position: relative;
    top: 20%;
    left: 10%;
    right: 10%;
    border-radius: 9999px;
    background-color: #FFF;
    box-shadow: 0px -5px 10px 0px #0085B0;
}

.p1{
    border-radius: 9999px;
    background-color: #333;
    height: 60%;
    width: 65%;
    position: relative;
    top:10%;
    left: 20%;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
    animation:pp1 5s ;
    -moz-animation:pp1 5s; /* Firefox */
    -webkit-animation:pp1 5s; /* Safari and Chrome */
    -o-animation:pp1 5s; /* Opera */
    -moz-animation-iteration-count:9999;
    -webkit-animation-iteration-count:9999;
    -o-animation-iteration-count:9999;
    animation-iteration-count:9999;
    }
@keyframes pp1{
    0%{top: 15%;left: 20%;height: 60%;width: 65%;}
    20%{top: 4%;left: 20%;height: 60%;width: 65%;}
    40%{top: 10%;left: 40%;height: 60%;width: 65%;}
    60%{top: 15%;left: 20%;height: 60%;width: 65%;}
    80%{top: 40%;left: 30%;height: 15%;width: 65%;}
    85%{top: 15%;left: 5%;height: 60%;width: 65%;}
    90%{top: 10%;left: 20%;height: 60%;width: 65%;}
    100%{top: 15%;left: 20%;height: 60%;width: 65%;}
    }
@-moz-keyframes pp1{
    0%{top: 15%;left: 20%;height: 60%;width: 65%;}
    20%{top: 4%;left: 20%;height: 60%;width: 65%;}
    40%{top: 10%;left: 40%;height: 60%;width: 65%;}
    60%{top: 15%;left: 20%;height: 60%;width: 65%;}
    80%{top: 40%;left: 30%;height: 15%;width: 65%;}
    85%{top: 15%;left: 5%;height: 60%;width: 65%;}
    90%{top: 10%;left: 20%;height: 60%;width: 65%;}
    100%{top: 15%;left: 20%;height: 60%;width: 65%;}
    }
@-webkit-keyframes pp1{
    0%{top: 15%;left: 20%;height: 60%;width: 65%;}
    20%{top: 4%;left: 20%;height: 60%;width: 65%;}
    40%{top: 10%;left: 40%;height: 60%;width: 65%;}
    60%{top: 15%;left: 20%;height: 60%;width: 65%;}
    80%{top: 40%;left: 30%;height: 15%;width: 65%;}
    85%{top: 15%;left: 5%;height: 60%;width: 65%;}
    90%{top: 10%;left: 20%;height: 60%;width: 65%;}
    100%{top: 15%;left: 20%;height: 60%;width: 65%;}
    }
@-o-keyframes pp1{
    0%{top: 15%;left: 20%;height: 60%;width: 65%;}
    20%{top: 4%;left: 20%;height: 60%;width: 65%;}
    40%{top: 10%;left: 40%;height: 60%;width: 65%;}
    60%{top: 15%;left: 20%;height: 60%;width: 65%;}
    80%{top: 40%;left: 30%;height: 15%;width: 65%;}
    85%{top: 15%;left: 5%;height: 60%;width: 65%;}
    90%{top: 10%;left: 20%;height: 60%;width: 65%;}
    100%{top: 15%;left: 20%;height: 60%;width: 65%;}
    }
.p2{
    border-radius: 9999px;
    background-color: #333;
    height: 60%;
    width: 65%;
    position: relative;
    top:10%;
    left: 20%;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
    animation:pp1 5s ;
    -moz-animation:pp1 5s; /* Firefox */
    -webkit-animation:pp1 5s; /* Safari and Chrome */
    -o-animation:pp1 5s; /* Opera */
    -moz-animation-iteration-count:9999;
    -webkit-animation-iteration-count:9999;
    -o-animation-iteration-count:9999;
    animation-iteration-count:9999;
    }
.top-yan1 {
    background-color: #FFF;
    height: 25%;
    width: 20%;
    border: 2px solid #333;
    border-radius: 9999px;
    float: left;
    margin-top: -10%;
    margin-right: 0%;
    margin-left: 25%;
    overflow: hidden;
}
.top-yan1:hover .p1{
    top:30%;}

.top-yan2 {
    background-color: #FFF;
    height: 25%;
    width: 20%;
    border: 2px solid #333;
    border-radius: 9999px;
    float: left;
    margin-top: -10%;
    margin-right: 0%;
    margin-left: 3%;
    overflow: hidden;
}
.top-yan2:hover .p2{
    top:30%;}
.top-lian:hover .p1{
    top:35%;
    left:30%;}
.top-lian:hover .p2{
    top:35%;
    left:6%;}
.top-bi1 {
    background-color: #FF5353;
    float: left;
    height: 15%;
    width: 15%;
    border: 2px solid #F33;
    margin-top: 12%;
    margin-right: 36%;
    margin-left: 42%;
    border-radius: 9999px;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
    box-shadow: 0px 0px 3px 0px #666666;
}
.top-bi1:hover{
    box-shadow: 0px 0px 5px 0px #FFE064;
    }
.top-bi2 {
    background-color: #FF5353;
    height: 100%;
    width: 0%;
    margin-top: 0%;
    margin-left: auto;
    margin-right: auto;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -ms-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    border-right-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-right-color: #C30;
    border-left-color: #C30;
}
.top-zui {
    background-color: #FF4848;
    float: left;
    height: 20%;
    width: 40%;
    margin-top: 0%;
    margin-right: 30%;
    margin-left: 30%;
    border-radius: 0px 0px 9999px 9999px;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -ms-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    border-bottom-width: 2px;
    border-bottom-style: solid;
    border-bottom-color: #C30;
    border-right-width: 2px;
    border-left-width: 2px;
    border-right-style: solid;
    border-left-style: solid;
    border-right-color: #C30;
    border-left-color: #C30;
}
.bixian {
    height: 13%;
    width: 100%;
    float: left;
    padding: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 2px;
}
.bixian2 {
    background-color: #FF4848;
    height: 100%;
    width: 0%;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
    border-right-width: 1px;
    border-left-width: 1px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-right-color: #D2380B;
    border-left-color: #D2380B;
}
.top-zui2{
    float: left;
    height: 35%;
    width: 100%;
    border-radius: 0px 0px 9999px 9999px;
    background-color: #FFFFFF;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -ms-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-right-color: #C30;
    border-bottom-color: #C30;
    border-left-color: #C30;
    margin-left: -2px;
    margin-top: -1px;
    }
.top-zui:hover{
    height: 20%;
    width: 60%;
    height: 30%;
    margin-right: 20%;
    margin-left: 20%;
    }
.top-zui:hover .top-bi2 {
    background-color: #FF5353;
    height: 100%;
    width: 0%;
    margin-top: 0%;
    margin-left: auto;
    margin-right: auto;
}
.top-zui:hover .p3{
    border-radius:0px;
    background-color: #F00;
    height: 30%;
    width: 65%;
    position: relative;
    top: 10%;
    left: 20%;
    }
.top-zui:hover .top-zui2{
    height: 10%;
    }
.mao1,.mao2,.mao3,.mao4,.mao5,.mao6{
    background-color: #369;
    height: 30%;
    width: 2%;
    position: relative;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
    }
.mao1{
    top: 20%;
    left: 5%;
    transform:rotate(-60deg);
}
.mao2{
    top: -10%;
    left: 88%;
    transform:rotate(55deg);
}
.mao3{
    top: -25%;
    left: 5%;
    transform:rotate(-90deg);
}
.mao4{
    top: -55%;
    left: 90%;
    transform:rotate(90deg);
}
.mao5{
    top: -70%;
    left: 5%;
    transform:rotate(-120deg);
}
.mao6{
    top: -100%;
    left: 90%;
    transform:rotate(120deg);
}
.top-lian:hover .mao1,.top-lian:hover .mao2,.top-lian:hover .mao3,.top-lian:hover .mao4,.top-lian:hover .mao5,.top-lian:hover .mao6{
    background-color: #F36;
    height: 32%;
    }
.bozi {
    background-color: #FFF;
    height: 2%;
    width: 40%;
    border: 2px solid #369;
    margin-top: -2%;
    margin-right: auto;
    margin-left: auto;
    border-radius: 9999px;
    position: relative;
    top: 46%;
    z-index: 1000;
}

.lingdan{
    height: 200%;
    width: 17%;
    border: 2px solid #FC0;
    border-radius: 9999px;
    overflow: hidden;
    background-color: #FEFAE9;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
    -webkit-transition: all 1s ease 0s;
    -moz-transition: all 1s ease 0s;
    -ms-transition: all 1s ease 0s;
    -o-transition: all 1s ease 0s;
    transition: all 1s ease 0s;
    }
.bozi:hover .lingdan{
    transform:rotate(360deg);
    }
.bozi:hover{
    background-color:
    background-color: #FFFDF7;
}
.shudiao{
    height: 80%;
    width: 10%;
    margin-top: 20%;
    margin-left: 43%;
    border-radius: 9999px;
    border-top-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-top-style: solid;
    border-right-style: solid;
    border-bottom-style: none;
    border-left-style: solid;
    border-top-color: #F4C708;
    border-right-color: #F4C708;
    border-bottom-color: #F4C708;
    border-left-color: #F4C708;
    background-color: #FFF;
    }
.shengti {
    cursor: pointer;
    background-color: #39C;
    height: 38%;
    width: 65%;
    margin-right: auto;
    margin-left: auto;
    border-radius: 9999px;
    margin-top: -4%;
}
.shoubi1 {
    cursor: pointer;
    background-color: #39C;
    height: 60%;
    width: 18%;
    border-radius: 9000px/30000px;
    transform: rotate(42deg);
    -webkit-transform: rotate(42deg);
    -moz-transform: rotate(42deg);
    -o-transform: rotate(42deg);
    position: relative;
    left: -10%;
    top: 7%;
    z-index: 1;
    border: 2px none #369;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;

}

.shengti:hover .shoubi1{
    top: -8%;
    transform: rotate(150deg);
    -webkit-transform: rotate(150deg);
    -moz-transform: rotate(150deg);
    -o-transform: rotate(150deg);
    animation:ss 0.5s ;
    -moz-animation:ss 0.5s; /* Firefox */
    -webkit-animation:ss 0.5s; /* Safari and Chrome */
    -o-animation:ss 0.5s; /* Opera */
    -moz-animation-iteration-count:5;
    -webkit-animation-iteration-count:5;
    -o-animation-iteration-count:5;
    animation-iteration-count:5;
    }
@keyframes ss{
    0%{top: 7%;transform: rotate(42deg);}
    50%{top: -8%;transform: rotate(150deg);}
    100%{top: 7%;transform: rotate(42deg);}
    }
@-moz-keyframes ss{
    0%{top: 7%;transform: rotate(42deg);}
    50%{top: -8%;transform: rotate(150deg);}
    100%{top: 7%;transform: rotate(42deg);}
    }
@-webkit-keyframes ss{
    0%{top: 7%;transform: rotate(42deg);}
    50%{top: -8%;transform: rotate(150deg);}
    100%{top: 7%;transform: rotate(42deg);}
    }
@-o-keyframes ss{
    0%{top: 7%;transform: rotate(42deg);}
    50%{top: -8%;transform: rotate(150deg);}
    100%{top: 7%;transform: rotate(42deg);}
    }
.shoubi1:hover {
    top: -8%;
    transform: rotate(150deg);
    }
.ctou1{
    cursor: pointer;
    border-radius: 9999px;
    height: 30%;
    width: 100%;
    border: 2px solid #CCCCCC;
    background-color: #FEFDF3;
    position: relative;
    top: 70%;
    }
.ctou2{
    cursor: pointer;
    border-radius: 9999px;
    height: 30%;
    width: 100%;
    border: 2px solid #CCCCCC;
    background-color: #FEFDF3;
    position: relative;
    top: 70%;
    }
.duzi{
    cursor: pointer;
    height: 82%;
    width: 80%;
    position: relative;
    left: 10%;
    top: -57%;
    right: 25%;
    background-color: #FFF;
    border: 2px solid #5B92C8;
    border-radius: 9999px;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
    z-index: 10;
    }
.shoubi2 {
    cursor: pointer;
    background-color: #39C;
    height: 60%;
    width: 18%;
    border-radius: 9000px/30000px;
    transform: rotate(-42deg);
    -webkit-transform: rotate(-42deg);
    -moz-transform: rotate(-42deg);
    -o-transform: rotate(-42deg);
    position: relative;
    top: -136%;
    z-index: 0;
    border: 2px none #369;
    left: 90%;
    -webkit-transition: all 0.5s ease 0s;
    -moz-transition: all 0.5s ease 0s;
    -ms-transition: all 0.5s ease 0s;
    -o-transition: all 0.5s ease 0s;
    transition: all 0.5s ease 0s;
}
.shoubi2:hover{
    top: -156%;
    transform: rotate(-150deg);
    -webkit-transform: rotate(-150deg);
    -moz-transform: rotate(-150deg);
    -o-transform: rotate(-150deg);
    }
.shengti:hover .shoubi2{
    top: -156%;
    transform: rotate(-150deg);
    -webkit-transform: rotate(150deg);
    -moz-transform: rotate(150deg);
    -o-transform: rotate(150deg);
    animation:ss1 0.5s ;
    -moz-animation:ss1 0.5s; /* Firefox */
    -webkit-animation:ss1 0.5s; /* Safari and Chrome */
    -o-animation:ss1 0.5s; /* Opera */
    -moz-animation-iteration-count:5;
    -webkit-animation-iteration-count:5;
    -o-animation-iteration-count:5;
    animation-iteration-count:5;
    }
@keyframes ss1{
    0%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    50%{top: -156%;transform: rotate(-150deg);-webkit-transform: rotate(-150deg);-moz-transform: rotate(-150deg);-o-transform: rotate(-150deg);}
    100%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    }
@-moz-keyframes ss1{
    0%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    50%{top: -156%;transform: rotate(-150deg);-webkit-transform: rotate(-150deg);-moz-transform: rotate(-150deg);-o-transform: rotate(-150deg);}
    100%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    }
@-webkit-keyframes ss1{
    0%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    50%{top: -156%;transform: rotate(-150deg);-webkit-transform: rotate(-150deg);-moz-transform: rotate(-150deg);-o-transform: rotate(-150deg);}
    100%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    }
@-o-keyframes ss1{
    0%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    50%{top: -156%;transform: rotate(-150deg);-webkit-transform: rotate(-150deg);-moz-transform: rotate(-150deg);-o-transform: rotate(-150deg);}
    100%{top: -136%;transform: rotate(-42deg);-webkit-transform: rotate(-42deg);-moz-transform: rotate(-42deg);-o-transform: rotate(-42deg);}
    }
.koudai{
    width: 80%;
    margin-right: auto;
    margin-left: auto;
    height: 35%;
    margin-top: 50%;
    border-radius: 0px 0px 9999px 9999px;
    background-color: #FFE;
    box-shadow: 0px 3px 3px 0px #FFFFEE;
    border-top-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: #369;
    border-right-color: #369;
    border-bottom-color: #369;
    border-left-color: #369;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -ms-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    }
.koudai:hover{
    height:40%;}
.xiaokoudai{
    float: left;
    height: 0%;
    width: 100%;
    margin-top: -2px;
    margin-left: -2px;
    -webkit-transition: all 0.7s ease 0s;
    -moz-transition: all 0.7s ease 0s;
    -ms-transition: all 0.7s ease 0s;
    -o-transition: all 0.7s ease 0s;
    transition: all 0.7s ease 0s;
    background-color: #FFFFEE;
    border-top-width: 2px;
    border-right-width: 2px;
    border-bottom-width: 2px;
    border-left-width: 2px;
    border-top-style: none;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-top-color: #369;
    border-right-color: #369;
    border-bottom-color: #369;
    border-left-color: #369;
    }
.koudai:hover .xiaokoudai{
    height: 70%;
    background-color: #FFFFFF;
    border-radius: 0px 0px 9999px 9999px;
    border-top-width: 2px;
    border-top-style: solid;
    border-top-color: #369;
    }
.jiao1{
    cursor: pointer;
    background-color: #39C;
    height: 30%;
    width: 35%;
    position: relative;
    top: -120%;
    left: 15%;
    z-index: -1;
    border-radius: 9000px/30000px;
    }
.jiao2{
    cursor: pointer;
    background-color: #39C;
    height: 30%;
    width: 35%;
    position: relative;
    top: -150%;
    left: 52%;
    z-index: -1;
    border-radius: 9000px/30000px;
    }
.jiaozi{
    cursor: pointer;
    background-color: #FEFDF3;
    border: 2px solid #CCC;
    position: relative;
    left: -3%;
    top: 70%;
    height: 40%;
    width: 106%;
    border-radius: 30000px;
    z-index: 2;
    }
body {
    background-color: #FFFDF4;
}

注:本内容仅供学习和观赏使用,禁止转载和商业使用,否则追究法律责任。

时间: 2024-11-01 19:16:54

用纯css3绘制的能自适应浏览器的哆啦a梦动画的相关文章

用纯CSS3绘制萌系漫画人物动态头像

大家已经见惯了用CSS3画的图标.LOGO.头像,这次台湾同学Rei给我们带来了用纯CSS3绘制的日本动漫<轻音少女>女主角秋山澪的动态头像.看到动图我震惊了!!!CSS3的强大再次霸气测漏! 示例中用到的主要CSS3特性如下: border-radius:绘制边框圆角. transform:主要是旋转(rotate)和偏斜(skew),用于绘制各种形状. animation:动画效果的实现,例如头发的飘动.眼睛的闪动. 只要掌握了这几个特性,你也能画出同样奇妙的CSS3动画,赶快试试吧!

石头教你如何用纯CSS3绘制三角形、箭头。

经常在有些网站上看到一些三角图形,但通常这些都是图片,现在石头就教你如何用纯css3技术来绘制三角图形. 下面是具体步骤,把这些看一遍你也就懂得怎样来绘制三角形.箭头了. 1.新建一个元素,随便什么元素,不过我习惯性的会用块元素来做.如果行内元素就display:block它. <div class="box"></div> 2.把它的宽高设置为height:0px; width:0px; 3.设置边框border属性,用来实现三角形. 首先要了解border具

【Web前沿技术】纯 CSS3 打造的10个精美加载进度条动画

之前向大家介绍8款优秀的 jQuery 加载动画和进度条插件,今天这篇文章向大家推荐10个纯 CSS3 代码实现精美加载进度条动画效果的方案.加载动画和进度条在网站和 Web 应用中的使用非常流行,特别是在使用 Ajax 技术加载内容的应用场景中,使用时尚的加载动画和进度条告诉用户内容正在加载中是一种非常友好的方式. 您可能感兴趣的相关文章 20个非常绚丽的 CSS3 特性应用演示 23个纯 CSS3 打造的精美LOGO图案 35个让人惊讶的 CSS3 动画效果演示 推荐12个漂亮的 CSS3

纯CSS3绘制的黑色图标按钮组合

在线演示 本地下载 原文地址:https://www.cnblogs.com/lovellll/p/10105307.html

7款纯CSS3实现的炫酷动画应用

1.纯CSS3实现人物摇头动画 这次我们要来分享一款超级可爱的纯CSS3人物摇头动画,初始化的时候人物的各个部位是利用CSS3动画效果拼接而成,接下来就是人物听音乐的场景,一边听音乐一边摇着脑袋,十分陶醉的样子,周围还会出现跳动的音符动画. 在线演示 源码下载 2.CSS3 Loading进度条加载动画特效 3款绚丽风格 今天我要分享一款更加炫酷的CSS3进度条加载动画特效,该动画特效有3个不同的风格,注意,IE6,7,8是不支持该进度条动画的. 在线演示 源码下载 3.纯CSS3实现云雾缭绕动

超可爱 纯CSS3实现的小猪、小老鼠、小牛

原文:超可爱 纯CSS3实现的小猪.小老鼠.小牛 利用纯CSS3绘制一些人物.动物.风景已经不是一件新鲜的事情了,主要是利用CSS3可以让直线变成任意的曲线,于是简单的矢量图形绘制对CSS3来说就小菜一碟了.今天要分享一下超级可爱的纯CSS3实现的小猪.小老鼠.小牛,先看靓照: 我们可以在这里查看这三个小动物的DEMO演示. 接下来我们逐个来贴出实现这三个小动物的CSS代码 一.小猪 HTML代码: <div id="pig"> <div id="pig_h

纯CSS3实现3D特效的iPhone 6动画

iPhone 6发布不久,屌丝怎能买得起,不过作为程序员,今天看到一个用纯CSS3绘制的iPhone 6,由于CSS3特性的运用,带有点3D的动画特效,大家可以先来看看在线演示效果. 在线演示        源码下载 HTML结构代码如下: <div id="wrapper"> <div id="iphone"> <div id="side"></div> <div id="line

8个超震撼的HTML5和纯CSS3动画源码

HTML5和CSS3之所以强大,不仅因为现在大量的浏览器的支持,更是因为它们已经越来越能满足现代开发的需要.Flash在几年之后肯定会消亡,那么HTML5和CSS3将会替代Flash.今天我们要给大家分享8个最新的HTML5和纯CSS3动画及其源码,这些动画非常让人震撼,你也可以学习一下HTML5源码. 1.HTML5 Canvas水波纹动画特效 HTML5的Canvas特性非常实用,我们不仅可以在Canvas画布上绘制各种图形,也可以制作绚丽的动画,比如这次介绍的水波纹动画特效.以前我们也分享

好程序员web前端学习路线分享纯css绘制各种图形

好程序员web前端学习路线分享纯css绘制各种图形,很多时候,UI设计师为了页面的好看,都会采用很多图形去做装饰,比如三角形.矩形.圆形.椭圆形.对话泡泡等,让整个页面看起来不会太单调.作为前端开发更多的时候,会采用比较快捷的实现方式就是用图片或者背景图来实现页面效果,但是有一个很大的问题就是图片可能会失真,有些情况也会发现用图片或者背景图去实现效果灵活度也不够.那么如果不用图片,用纯CSS也是可以绘制各种图形的,很多人都以为css只能写一些简单的图形,比如长方形.正方形.圆形.椭圆,其实不然,