“98057a361cfd4bbbfcf82e0580c0755fce5be8ed”上不存在“develop/api_doc/v2/fluid/io.html”
提交 fe2e24b1 编写于 作者: 彭世瑜's avatar 彭世瑜

fix

上级 424f5519
......@@ -64,3 +64,68 @@ display: block;
- a 标签内部可以嵌套任意内容
> a 标签不能嵌套 a 标签
## 盒子模型
(1)盒子
标签可以看做是一个盒子
(2)盒子模型:
- 外边距区域 margin
- 边框区域 border
- 内边距区域 padding
- 内容区域 content
(3)盒子内容的宽高
- width
- height
(4)边框
```css
/* 粗细 线条样式 颜色(不分先后顺序)*/
/* 默认4个方向都有*/
border: 10px solid red;
/* 单个方向 */
border-top: 10px solid red;
border-bottom: 10px solid red;
border-left: 10px solid red;
border-right: 10px solid red;
/* 单个属性 */
border-width: 边框粗细
border-style: 边框样式
border-color: 边框颜色
```
线条可选样式
- solid 实线
- dashed 虚线
- dotted 点线
盒子尺寸 = width / height + 边框线
布局顺序:从外到内,从上到下
(5)内边距 padding
```css
/* 可取 4 个值、3 个值、2 个值、1 个值 */
padding: ;
padding: 左右 ;
padding: 上下 左右;
padding: 上下左右;
```
规律:顺时针,值不够看对边
(6)导航实例
[](demo/css-box-1.html ':include :type=code')
[](demo/css-box-1.html ':include height=70')
<style>
.box {
border-top: 3px solid #ff8500;
border-bottom: #edeef0;
}
.box a {
/* 先写盒子大小 */
display: inline-block;
width: 80px;
height: 40px;
/* 推荐先写上背景,便于查看盒子大小 */
/* background-color: #edeef0; */
/* 再写文字样式 */
line-height: 40px;
text-align: center;
color: #4c4c4c;
font-size: 12px;
text-decoration: none;
}
/* 鼠标悬停效果 */
.box a:hover {
background-color: #edeef0;
color: #ff8044;
}
</style>
<div class="box">
<a href="#">首页</a>
<a href="#">文章</a>
<a href="#">分类</a>
<a href="#">标签</a>
</div>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册