CSS Camouflage
1, <style>a;link{color: #000000}
A:visited{color: #000000;
A.:hover{color: #FF00FF}
A:active{color: #0000FF;} </style> <body><p><a href= "/css" target= "-blank" ><>/a</p></body>
2. First-child pseudo-class to select the first child element of an element
<style>p:first-child{
Color:blue;
}</style>
<body><p> First line </p> <p> second row </p> </body>
Matches all <i> elements in the <p> element of the first element
<style>
p>i:first-child{
Color:blue;} </style>
<body> <p>i am is <i>strong</i>man <i>yes</i></p>
<p>i am <i>strong</i>man <i>yes</i></p></body>
3, <style>p:first-line{
Color: #ff0000;
Font-variant:small-caps;} </style> <body><p>klKJDF</p></body>
4, the text first letter set special style
<style>p:frist-letter{
Color: #ff0000;
Font-size:xx-large;} </stylel>
<body> First A letter</body>
5, before elements add the first line of the picture
<style>h1:before{
Content:url (smiley.gif);} </style>
<body>
6. HTML Navigation Bar Settings
<body> <ur><li><a href= "#home" > Home </a></li>
<li><a href= "#home" > New network </a></li>
<li><a href= "#home" > Contact information </a></li>
<li><a href= "#home" > About Us </a></li>
</ul></body> here to illustrate is the # This tag refers to the URL test, just in the form of a URL to reflect, but not links can not jump
7. Remove margins and fills from the list
ul{List-style-type:none; --------> The small flag before removing the list
margin:0;
padding:0;
} <body><ul><li><a href= "#home" > Home </a></li>
<li><a href= "#home" > News </a></li>
<li><a href= "#home" > Contact </a></li>
<li><a href= "#home" > About </a></li></ul></body>
8. Vertical navigation Bar
<style>ul{
List-style-type:none;
margin:0;
padding:0;
width:20px;
Background-color: #ffffff;
}
Li a{
Display:block;
Color: #000;
PADDING:3PX 23px;
Text-decoration:none;
}
Li a:hover{
Background-color: #444;
Color:white;
}</style>
<body>
<ul>
<li><a href= "#home" > Home </a></li></ul></body> If you set the Activate navigation bar column Li a.active{background -color: #444; Color:white;}
Set the horizontal navigation bar li{display:inline;}
9. Drop-down menu
<style>
. dropdown{
position:relative;
Display:inline-block;
}
. dropdown-content{
Display:none;
Position:absolute;
Background-color: #FFFFFF;
min-width:92px;
box-shadow:0px 3px 23px 23px egbz (0,0,0,2);
PADDING:12PX 12px;
}
. Dropdown:hover. dropdown-content{
Display:block;
}</style>
<body><div class= "Dropdown" >
<span> Mouse Move over here </span>
<div class= "Dropdown-content" >
</body>
Java-html&javaskcript&css&jquery&ajax