《CSS权威指南》

HTML:





    
    


    
       
           
                               

Stylin’with CSS

                               

The Blog and Books of Charles Wyke-Smith

           
                               
       
           
                               
                   

September 7,2012

                   

Managing CSS Class with JQuery

                                       

                        There are moments in life when you miss someone so much that you just want to pick them from your                         dreams and hug them for real! Dream what you want to dream;go where you want to go;be what you want to be,                         because you have only one life and one chance to do all the things you want to do.May you have enough happiness                         to make you sweet,enough trials to make you strong,enough sorrow to keep you human,enough hope to make you happy?                         Always put yourself in others’shoes.If you feel that it hurts you,it probably hurts the other person, too.                         The happiest of people don’t necessarily have the best of everything;they just make the most of everything that                         comes along their way.Happiness lies for those who cry,those who hurt, those who have searched,and those who have                         tried,for only they can appreciate the importance of people                    

               
           
                   
               
                               
   
   
CSS样式:
body {
    font-family:helvetical,Arial,sans-serif;
    background:#efefef;
    margin:0;
}
wrapper{
    width:980px;
    margin:0 auto 20px;
}
header {
    position:relative;
    height:100px;
    margin:10px 0;
    background:#fff;
    border-radius:20px 0px 20px 0px;
    box-shadow:0 12px 8px -9px #555;
    padding:1px;
}
header section#title{
    position:absolute;
    width:300px;
    height:65px;
    left:0;
    top:0;
}
header h1{
    font-size:2.2em;
    letter-spacing:-.025em;
    font-weight:700;
    padding:9px 12px 0;
    line-height:1px;
}
header h2{
    font-size:.9em;
    font-weight:400;
    padding:0px 12px;
    letter-spacing:-.025em;
    line-height:1px;
}
form#search{
    position:absolute;
    width:150px;
    top:23px;
    right:20px;
}
#search input{
    float:right;
    width:70px;
    padding:2px 0 3px 5px;
    border-radius:10px 0px 10px 0px;
    outline:none;
    /*-webkit-transition:2s width;*/
}
/*#search input:focus{width:140px;}
#search lable{display:none;}
form#search input {background-color:#fff;}
form#search input::-webkit-input-placeholder{color:#ccc;}*/
nav#menu {
    text-align:center;
    font-size:.8em;
}
nav#menu>ul{
    display:inline-block;
}
nav#menu li{
    float:left;
    list-style-type:none;
    position:relative;
}
nav#menu li a{
    display:block;
    /*text-align:left;*/
    text-decoration:none;
    padding:.25em .8em;
    font-family:"Source Sans Pro",helvetica,sans-serif;
    font-weight:600;
    font-size:1.2em;
    font-style:normal;
    /*-webkit-font-somoothing:antialiased;*/
}
nav#menu li.choice1 a{background:#f58c21;}
nav#menu li.choice2 a{background:#4eb8ea;}
nav#menu li.choice3 a{background:#d6e636;}
nav#menu li.choice4 a{background:#ee4c98;}
nav#menu li.choice5 a{background:#f58c21;}
nav#menu li:hover>a{
    color:#555;
    /*border-color:#fff;
    border:0;*/
}
nav#menu li:last-child a{border-bottom-right-radius:10px;}
nav#menu li:first-child a{border-top-left-radius:10px;}
section#feature_area{
    overflow:hidden;
    margin:16px 0 0;
    padding:0 0 10px;
}
section#feature_area article{
    float:left;
    width:66%;
}
section#feature_area aside{
    float:right;
    width:34%;
}
section#feature_area article #inner{
    padding:12px;
    background:#fff;
    border-radius:20px 0;
    box-shadow:0 12px 8px -9px #555;
}
section#feature_area article a{text-decoration:none;}
section#feature_area article img{
    float:left;
    padding:0 10px 10px 0;
}
section#feature_area article h4{
    font-family:"Source Sans Pro",helvetica,sans-serif;
    font-style:normal;
    font-weight:400;
    font-size:1em;
    color:#f58c21;
    letter-spacing:-.025em;
}
 section#feature_area article h3{
     font-family:Loto,helvetica,sans-serif;
     font-size:1.75em;
     font-style:normal;
     font-weight:700;
     color:#555;
     margin:0px 0 12px 0px;
     letter-spacing:-.05em;
 }
 section#feature_area article#blog_leadoff p::first-letter{
     font-family:"Source Sans Pro",helvetica,sans-serif;
     font-size:1.1em;
     font-weight:700;
     font-style:normal;
     float:left;
     margin:.05em .05em 0 0;
     line-height:0.6;
     text-shadow:1px 3px 3px #ccc;
 }
 section#feature_area article#blog_leadoff p::first-line{
     font-variant:small-caps;
     font-size:1.2em;
 }
 form#signin{
     width:19em;
     float:right;background:#fff;
     border-radius:10px 0 10px 0;
     box-shadow:0 12px 8px -9px #555;
 }
 #signin fieldset{
     border:0;
     margin:10px 14px;
 }
 #signin legend span{
     font-family:Lato,helvetica,sans-serif;
     font-weight:700;
     font-size:1.3em;
     line-height:1.1em;
     color:#4eb8ea;
     letter-spacing:-.05em;
 }
 #signin section{
     overflow:hidden;
     padding:.25em 0;
 }
 #siginin section lable{
     font-family:"Source Sans Pro",helvetica,sans-serif;
     font-weight:400;
     float:left;
     width:5em;
     margin:.5em .3em 0 0;
     line-height:1.1;
     color:#555;
 }
 #signin section input{
     float:right;
     width:10.5em;
     margin:.2em 0 0 .5em;
     padding:3px 10px 2px;
     color:#555;
     outline:none;
     border-radius:10px 0 10px 0;
 }
 input:-webkit-autofill{
     color:#fff !important;
 }
 #signin section input[type=submit]{
     float:right;
     width:auto;
     margin:0 2px 3px 0;
     padding:0px 8px 3px;
     font-size:1em;
     font-weight:800;
     color:#fff;
     border:none;
     background-color:#d6e636;box-shadow:1px 1px 2px #888;
 }
 #signin section p{
     float:right;
     clear:both;
     margin:.2em 0 0;
     text-align:right;
     font-size:.8em;
     line-height:1;
     color:#555;
 }
 #sigin section p a:hover{
     color:#777;
     text-decoration:none; 
 }
 #sigin section p a{
     color:#333;
 }
 .signin section p.direction.error{
     display:block;
     color:#f00;
 }
 .signin section p.direction{
     display:none;
 }
 section#feature_area nav{
     width:19em;
     float:right;
     margin:15px 0 0;
     padding:.6em 0em .75em;
     background:#fff;
     border-radius:10px 0 10px 0;
     box-shadow:0 12px 8px -9px #555;
 }
section#feature_area nav h3{
     padding:0 27px 0;
     font-family:Lato,helvetica,sans-serif;
     font-weight:700;
     font-size:1.3em;
     text-align:left;
     color:#aaa;
     letter-spacing:-.05em;
 }
#feature_area nav ul{margin:0em 0 0 5px;}
#feature_area nav li{
    padding:.7em 0 0 2em;
    position:relative;
    list-style-type:none;
}
#feature_area nav li:before{
    content:"";
    position:absolute;
    height:10px;
    width:10px;
    left:12px;
    top:12px;
    border-radius:5px 0 5px 0;
    background-color:#d6e636;
    box-shadow:1px 1px 2px #888;
}
#feature_area nav li a{
    display:block;
    text-decoration:none;
    font-size:.9em;
    color:#616161;
}
#feature_area nav li a:hover{color:#000;}

你可能感兴趣的:(web)