Blogger Information
Blog 28
fans 1
comment 0
visits 17295
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
2019.4.25作业
关超的博客
Original
536 people have browsed it
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS中的常用选择器</title>
<style type="text/css">
	.div1{width:80px ; height:80px; background-color:#ccc;}  
	#div2{width:80px ; height:80px; background-color:pink;}
	p{ background-color:green;}
	p[id="divid"]{ background-color:red;}
	.div3{width:80px ; height:80px; background-color:yellow;}
	.div3 span{ background-color:#ff6700;}
	h3:first-of-type{ background-color:lightblue;}
	h3:last-of-type{background-color:lightgreen;}
	h4:nth-child(4){ background-color:lightgreen;}
	.div5{ background-color:#ccc;}
	li:nth-of-type(3){ background:wheat;}
</style>
</head>

<body>
    <div class="div1">
    </div>
    <div id="div2">
    	<p>我是P元素</p>
        <p id="divid">我是P元素</p>
    </div>
    <div class="div3">
    	<span >1</span>
        <span>2</span>
        <span>3</span>
    </div>
	<h3>1</h3>
	<h3>2</h3>
	<h3>3</h3>
	<div class="div4">
        <h4>1</h4>
        <h4>2</h4>
        <h4>3</h4>
        <h4>4</h4>
        <h4>5</h4>
    </div>
    <div class="div5">
    	<ul>
        	<li>1</li>
        	<li>2</li>
        	<li>3</li>
        	<li>4</li>
        	<li>5</li>                                                
        </ul>
    </div>
</body>
</html>

QQ图片20190425230652.png

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post