背景
来源:互联网 发布:js 图片无缝滑动轮播 编辑:程序博客网 时间:2024/04/28 00:38
1、简单背景:
(1) 图片:background: url(img/back.jpg) 20px 20px;
(2) 颜色:background: #ffff;
2、基本背景:
background-color:bisque;
background-image: url(img/back.jpg);
/*repeat-x、repeat-y、repeat、no-repeat*/
background-repeat: no-repeat;
/*要求图片固定在浏览器一角或一侧时用fixed属性,否则默认scroll*/
background-attachment: fixed;
/*repeat-x时定位左右无效,repeat-y时定位上下无效,repeat时定位完全失效*/
/*background-position:top right;*/
background-position: left top ;
3、新属性background-origin:
background-size:50px 40px;
/*背景图片的原点位置,content-box,padding-box或border-box*/
background-repeat:no-repeat;
background-origin:border-box;
4、新属性background-clip:
背景图片的剪切,content-box,padding-box或border-box,在webkit内核下还有text属性
background-image:url(img/back.jpg) ;
/*不兼容ie8*/
background-size:90px 120px;
background-repeat:no-repeat;
background-clip:border-box;
5、新属性background-size:
auto:原像素,
90px120px:自定义像素,
90px:根据这一像素,按原比例调整像素,
50%:占div的比例;
cover:放大填充
contain:按原比例缩放到div,不够的留白
6、新属性多背景属性 background:background-image|background-position|background-size|background-repeat|background-attachment|background-clip|background-origin,*
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- 背景
- UISearchBar背景透明,去掉背景,自定义背景
- UISearchBar背景透明,去掉背景,自定义背景
- UIsearchBar背景透明,去掉背景,自定义背景
- UISearchBar背景透明,去掉背景,自定义背景
- ZeroMQ,史上最快的消息队列 —– ZMQ的学习和研究
- HDU-4850 Wow! Such String! (构造)
- 边框
- Android学习历程之完全退出应用程序App
- Where my books go ——by William Butler Yeats
- 背景
- 多线程基础
- 文本
- 空字符串 null 判断
- centos安装第三方软件库,flash和视频播放器
- 颜色
- 利用de Casteljau算法绘制Bezier曲线
- hdu 3461 Code Lock【并查集+快速幂】
- 设计模式:模板方法模式(Template)