CSS学习
来源:互联网 发布:h5砸金蛋游戏源码 编辑:程序博客网 时间:2024/06/06 02:22
CSS : 层叠样式表
1,作用 : 美化Html页面
2,css的3种写法
a,行间样式表
<div style = "width:200px; height : 100px; border:1px solid red;"> 123 </div>
b,内部样式表
<head>
<title> html学习 </title>
<style type="text/css">
#aaa{width:400px;height:300px;border:2px solid blue; }
</style>
</head>
<div id="aaa">456</div>
c,外部样式表 样式代码专门放到一个文件中,由html网页调用
css文件 {width:200px;height:150px;border:3px solid yellow;background:pink;}html文件: rel="stylesheet" rev="stylesheet" href = "abc.css"><div id="bbb">789</div>
3,选择器
标签选择器
id选择器
类选择器
<html>
<head>
<title>css_Study</title>
<style type="text/css">
p{font-size : 30px;color:red;}
div{width:200px;height:30px;border:1px solid red}
#aaa{color:green }
.cls{text-decoration:underline}
</style>
</head>
<body>
<p>这是一个p标签</p>
<div>这是一个div标签</div>
<a id="aaa">这是一个a标签</a>
<br/>
<div class="cls">这是一个div标签</div>
</body>
</html>
0 0
- 【CSS学习】CSS语法
- 【CSS学习】CSS 创建
- 【CSS学习】CSS 背景
- 【CSS学习】CSS 表格
- 【CSS学习】CSS 边框
- css学习--css基础
- 学习CSS
- CSS学习
- CSS学习
- css学习
- CSS 学习
- CSS学习
- css 学习
- CSS 学习
- CSS学习
- css学习
- CSS 学习
- CSS 学习
- 使用eclipse创建之前没有创建的web.xml
- 有效学习的方法
- cart(分类与回归树)原理与实现
- mysql分区
- iOS CoreGraphics 框架介绍
- CSS学习
- 290. Word Pattern*
- Box2D中切割刚体效果的实现一览(一)
- 【BZOJ 3524】[Poi2014]Couriers 主席树裸题
- Centos7使用编译源码方式安装mysql
- LeetCode 230. Kth Smallest Element in a BST
- MongoDB范式化与反范式化
- CNN公式推导
- Box2D中切割刚体效果的实现一览(二)