A CSS3

: 11.01.2014
: 
: bulatlab.ru

, !

 

  , CSS3,     . . ( ..:) ) IE 9 .

 

c target, html-. span tab1, tab2, tab3, tab4 ( ).

 

( ). ( ) span, target ( div 100px.)

 

, :

 

   CSS3

 

accordion.css

 

*{ margin:0; padding:0;}
body {color:#fff;font:14px/1.3 Tahoma;}
.accordion {
    color: #000000;
    margin: 50px auto;
    position: relative;
    width: 300px;
}
.accordion span {
    display: none
}
.tabs {
    background-color: #FFFFFF;
    overflow: hidden;
}
.tabs dl dd  a{
   text-decoration: none;
   padding: 5px 40px;
   color:#777;
}
.tabs dl dd  a:hover{
color:#444;
text-decoration: underline;
}
.tabs dl dd  .pp {
    color:#444;
    background-color: #C8CEFF;
    border: 1px solid;
    border-color:#ccc;border-bottom-color:#aaa;
    display: block;
    font-size: 18px;
    line-height: 32px;
    padding: 5px 20px;
    text-decoration: none;
    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#ffffffff,EndColorStr=#ffe0e0e0);
    background-image: -moz-linear-gradient(top,#fff 0,#e0e0e0 100%);
    background-image: -ms-linear-gradient(top,#fff 0,#e0e0e0 100%);
    background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);
    background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(100%,#e0e0e0));
    background-image: -webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);
    background-image: linear-gradient(to bottom,#fff 0,#e0e0e0 100%);
    -moz-transition: 0.3s;
    -ms-transition: 0.3s;
    -o-transition: 0.3s;
    -webkit-transition: 0.3s;
    transition: 0.3s;
}
.tabs dl dd div {
    background-color: #FFF;
    height: 0;
    overflow: hidden;

    box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;
    -moz-box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;
    -webkit-box-shadow: 0 0 1px rgba(0, 0, 0, 1) inset;

    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    -ms-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
}
.tabs dl dd .pp:hover {
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
    -moz-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
    -webkit-box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.5) inset;
     text-decoration: none;
}
.tabs dl dd .pp:active {
    filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#e6e6e6,EndColorStr=#dcdcdc);
    background-image: -moz-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -ms-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -o-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#e6e6e6),color-stop(100%,#dcdcdc));
    background-image: -webkit-linear-gradient(top,#e6e6e6 0,#dcdcdc 100%);
    background-image: linear-gradient(to bottom,#e6e6e6 0,#dcdcdc 30%);
}

#tab1:target ~.tabs .tab1 dd div {height: 100px;}
#tab2:target ~ .tabs .tab2 dd div {height: 100px;}
#tab3:target ~ .tabs .tab3 dd div {height: 100px;}
#tab4:target ~ .tabs .tab4 dd div {height: 100px;}

! , , , div ( ).

 

!

 

 

  

 

 
: 3037
: 0
: (0)