前端学习笔记(二)

css之外链式写法

<link rel = "stylesheet" href = "1.css">

块元素转换为行内元素

display : inline ;

行内元素转块元素

display : block;

块和行内元素转行内块元素

display : inline block;

优先级

默认样式 < 标签选择器 < 类选择器 < id选择器 < 行内样式 < !important
0             1        10        100       1000        1000以上

链接伪类

a : link { 属性 : 值 }

a : link {属性 : 值}   链接默认状态
a : visited {属性 : 值} 链接访问之后的状态
a : hover {属性 : 值}  鼠标放到链接上显示的状态
a : active {属性 : 值} 链接激活的状态
  : focus {属性 : 值} 获取焦点

//链接文本修饰  下划线
//line-through 中间线  none 没有下划线
text-decoration : none | underline |line-through

背景属性

background-repeat : repeat(默认平铺)
background-repeat : no-repeat(不平铺)
background-repeat : repeat-x(水平方向平铺)
background-repeat : repeat-y(竖直方向平铺)

//*-------------------------------
方位值只写一个的时候,另外一个值默认是居中的
background-position : left | right | center | top | bottom

//*-------------------------------
background-attachment : scroll   背景滚动  fixed 不滚动

//背景属性连写 (连写没有顺序要求,但是url是必写的)
background : red url("1.png") no-repeat bottom scroll 

列表背景

// li 清楚列表项符号
list - style : none
// li加背景图片
background : url("li.gif") no-repeat left center

盒子模型之边框

border-top-color : red    //边框颜色
border-top-width : 5px
border-bottom-style : solid   //实线
border-bottom-style : dotted  //点线
border-bottom-style : dashed  //虚线

//边框属性连写 (没有顺序要求,但是线型为必写项)
border-top : red solid 5px

input 取消边框

//去掉边框线
border : 0 none
//去掉轮廓线
outline - style : none 
//获取光标焦点
label for id  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郭_昊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值