CSS3笔记

CSS的颜色表达
颜色宝典
CSS背景图片的设置

 overflow: scroll;
            /*设置滚动条*/
            background-image: url("resources/background.png"), url("resources/background.png");
            /*左边的背景图会去覆盖右边的背景图,背景图还会覆盖背景颜色*/
            background-repeat: no-repeat;
            /*no-repeat图像不重复,space水平重复图像*/
            background-position: 0px 0px;
            /*设置图像的位置*/
            background-size: 100%;
            /*设置图像的大小*/
            background-attachment: local
            /*设置为local会随着元素的滚动而滚动的,默认跟着页面滚动,fixed为固定不动*/;
            background-origin: padding-box;
            /*图像从哪个内边区域进行显示*/
            background-clip: content-box;
            /*图像从内边区域的哪个地方显示*/

边框的属性:
border-style:
在这里插入图片描述
其他的属性:

border-width: 30px;
border-color: 45px;
border-top-style:
border-right-style:
border-bottom-style:
border-left-style:
border-style:top,right,bottom,left
border-top-left-radius: 15px,15px 改变上和左的边框效果,两个15px分别指水平弧度的半径和竖直弧度的半径
border-radius:30px / 15px: 所有的边框水平弧度半径30px,竖直弧度半径15px

图像边框:
border-image-source: url(background.png); 图像来源
border-image-slice:30; 中间不用,将其他的图像边框进行切分
border-image-repeat:round; 图像拉伸方式
border-image-width: 图像宽度
border-image-outset: 10px; 边框离中间内容距离 

块内设置:
在这里插入图片描述

#clas a{
display: inline-block;
/*块内元素横向排列*/
width: 200px;
height: 50px;
color: white;
background: green;
text-align: center;
/*水平居中*/
float: right;
/*靠右放*/
z-index: num;
/*num越大,在多个图片叠在一起的时候越靠上显示*/
}

往下拉快到底时才显示的实现:

.pink{
width: 200px;
height: 200px;
background-color: pink;
}
.lightblue{
width:200px;
height:100px;
position:sticky;
/*结合了float和fixed,当到某个位置时才被定住*/
bottom: 50%;
z-index: -1;
background-color: lightblue;
}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值