doraemon的python 标签的使用方法案例

### 11.3 标签的一些使用方法shili

如何让文本垂直和水平居中?

```html
<style>
    div{
        200px;
        height:60px;
        backgroud-color:red;
        text-align:center;
        line-height:60px;
        
    }
</style>
<div>
    liujia
</div>


/*让行高等于和模型的高度实行垂直居中*/
/*使用text-align:center;事项文本水平居中*/
```

如何清除a标签的下划线?

```html
text-decoration:none;

none;无线
underline;下划线
overline;上划线
line-through;删除线
```

如何重置网页样式:

reset.css

```css
html,body,p,ol,ul{
    margin:0;
    padding:0;
}

/*通配符选择器,选择所有*/
*{
    margin:0;
    padding:0;
}
a{
    text-decoration:none;
}
清除input和textarea标签的默认边框和外线
input,texttarea{
    border:none;
    outline:none;
}
```

css中的哪些塑形是可以继承下来的

```css
color,text-xxx,font-xxxx,line-height,letter-spacing,word-spacing
```

如何在p标签的后面面添加‘&’内容?

```css
<style>
p::after{
    /*行内元素*/
    content:'&',
    color:red;
    font-siaze:20px;
    
}
</style>
<p>liujia<p>
```

字体加粗使用哪个属性,它的取值有哪些?

```css
font-weight:lighter | normal | bold | bolder | 100~900
font-size:italic; /*斜体*/
```

分别说明px,em,rem单位的意识?

```css
px: 绝对单位 固定不变的尺寸
em和rem:相对单位 font-size
    em:相对于当前的盒子
    rem:相对于根元素(html)
```

如何设置首航缩进,一般用什么单位?

```css
em
```

文本水平排列方式是哪个属性,它的取值有?

```css
text-align:left | center | right | justify(仅限于英文,两端对齐)
```

如何让一个盒子水平居中

```css
盒子必须有宽度和高度,在设置:margin:0 auto;
让文本水平居中:text-align:center;
让文本锤子居中:line-height = height(盒子的高度)
```

margin在垂直方向上会出现什么现象?

```css
/*外边距合并,塌陷
尽量避免出现塌陷问题,只要设置一个方向上的margin
*/
```



### 11.5 常用格式化排版
原文地址:https://www.cnblogs.com/doraemon548542/p/11515965.html