Blogger Information
Blog 2
fans 0
comment 0
visits 931
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
html基础标签+css选择器的应用——2018年8月11日15时06分
成家大少的博客
Original
492 people have browsed it

学习网页编辑是一件很枯燥的事,

实例

<!DOCTYPE html> <!--声明文档类型--> <!--注释的快捷键:(ctrl+/)-->
<html>
<head><!--头部-->
<title>php中文网——视频教程</title><!--定义网页头部标题-->
<meta charset="utf-8"><!--编码-->
<link rel="stylesheet" type="text/css" href="static/style.css"><!-- 外部样式:为了共享 -->
<link rel="stylesheet icon" type="imagee/x-icon" href="images/footlogo.png">
<style type="text/css">/*内部样式:只针对当前页面*/
             /*tag标签名、id名(名字前面加#)class名  属性选择器*/
            body{}/*标记选择器*/
            #box{width: 100px;height: 100px;background: pink;}/*id 选择器 唯一性*/
            .mainf{width: 100px;height: 100px;background: green;}/* class选择器 类*/
            a{color: red;}
            a[href="http://www.php.cn/"] {color: blue;}
            a[href="demo2.html">demo2] {color: pink; }
            div a{color: #000;}
            #box a{}


</style>
</head>
<body>
	<img src="" >
	<a href="https://www.baidu.com">百度</a>
	<a href="http://www.php.cn">php中文网</a>
	<a href="demo2.html">demo2</a>
	<a href="#">#</a>
	<div id="box">
     <a href="">php</a>
     <div class="main"></div>
     <div></div>
     <div></div>
	</div>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

20180811154442.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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!