text-indent: 2em; /* 设置首行缩进两个汉字 Logo优化内容移除*/
text-align: center; /* text-align给块级元素设置,其文本会水平居中 */
text-decoration: none; /*去掉下划线*/
font-style: italic ; /* 文字斜体显示*/
font-weight: 700; /* 文字加粗显示*/
line-height: 20px; /* 设置文字的行高*/
line-break: normal; /*应用日文文本的默认换行规则*/
list-style: none; /* 去除列表前面的图标*/
disabled:true; /*禁用文本框*/
disabled:false; /*解禁文本框*/
outline-style: none; /* 去掉输入框的默认轮库线*/
overflow: hidden; /*1 触发元素的bfc(格式化上下文) 解决外边距塌陷问题
2 将多余部分隐藏 可设置 水平 垂直方向的如 : overflow-x: hidden; overflow-y: hidden;
3 给父元素这是 可以清楚浮动
* * */
overflow: auto; /*给添加滚动条 可设置水平 */
overflow:hidden; /*超出的部分隐藏 */
visibility:hidden; /*元素隐藏 该属性隐藏元素后,元素占位置*/
display:none: ; /*元素隐藏 隐藏元素不占位置*/
display: block; /*显示元素*/
display: inline; /* 转化为 行*/
display: block; /* 转化为 块*/
vertical-align: baseline /*只对img/img4和表格起作用*/
vertical-align: middle; /*垂直居中对齐*/
border-collapse: collapse; /* 合并边框 与 表格属性中的 cellspacing="0" 一样*/
white-space: nowrap; /*将行内快元素在一行上显示*/
background-attachment: scroll; /*设置背景img/img4固定方式 Scroll 滑动; Fixed: 固定; */
a:link { /* 设置a标签默认样式*/
color:red;
text-decoration: none; /*去掉下划线*/
}
a:visited{ /* 链接访问过后的样式 */
color:darkgoldenrod;
}
a:hover{ /* 鼠标移动到超链接上的样式 */
color: #008000;
text-decoration: underline;
}
a:active{ /* 链接激活状态下的样式 */
color:aquamarine;
}
/*三种定位的关键之 与作用范围
* 绝对定位(absolute) (看脸型) ---- 脱标------ 不占位 ----- 实现模式转换
*
* 相对定位 (relative) (自恋型)---- 未脱标------ 占位 ----- 不能实现模式转换
*
* 固定定位(fixed) ---- 脱标------ 不占位 ----- 实现模式转换
* */
/*脱标的盒子居中显示(重点)
1 首先走父盒子宽度一半
* 2 使用margin-left设置往回走子元素自己宽度的一半
* position: absolute;
* left: 50%;
* margin-left: -250px;
* */
css 容易混淆属性
最新推荐文章于 2022-12-23 14:19:35 发布