黑松山资源网 Design By www.paidiu.com
背景裁剪
- background-clip:border-box|padding-box|content-box|text
用于指定background是否包含content之外的border,padding。默认值为border-box,即background从包含border在内的地方开始渲染,IE的默认表现也等同于border-box
背景从border(即包括border在内)开始绘制(渲染)
- #background-clip-border{
- -moz-background-clip:border-box; /* For Firefox */
- -webkit-background-clip:border-box; /* For Chrome, Safari */
- -o-background-clip:border-box; /* For Opera */
- -ms-background-clip:border-box; /* For IE */
- background-clip:border-box; /* For Future */
- }
背景从padding(即包括padding在内)开始绘制:
- #background-clip-padding{
- -moz-background-clip:padding-box; /* For Firefox */
- -webkit-background-clip:padding-box; /* For Chrome, Safari */
- -o-background-clip:padding-box; /* For Opera */
- -ms-background-clip:padding-box; /* For IE */
- background-clip:padding-box; /* For Future */
- }
背景从content(即内容部分)开始绘制:
CSS Code复制内容到剪贴板- #background-clip-content{
- -moz-background-clip:content-box; /* For Firefox */
- -webkit-background-clip:content-box; /* For Chrome, Safari */
- -o-background-clip:content-box; /* For Opera */
- -ms-background-clip:content-box; /* For IE */
- background-clip:content-box; /* For Future */
- }
将背景裁剪作为文本的填充色:
CSS Code复制内容到剪贴板- /* 如果你的浏览器支持text值,你将会看到本段文字的颜色直接使用了背景颜色:红色,且背景将被裁剪掉不再显示 */
- #background-clip-text{
- background-color:#f00;
- -webkit-text-fill-color:transparent;
- -webkit-background-clip:text; /* For Chrome, Safari */
- background-clip:text; /* For Future */
- }
背景图片位置
- background-origin:border-box|padding-box|content-box
以border(即包括border)为原点计算背景图的background-position:
- #background-origin-border{
- -moz-background-origin:border-box; /* For Firefox */
- -webkit-background-origin:border-box; /* For Chrome, Safari */
- -o-background-origin:border-box; /* For Opera */
- -ms-background-origin:border-box; /* For IE */
- background-origin:border-box; /* For Future */
- }
以padding(即包括padding)为原点计算背景图的background-position:
- #background-origin-padding{
- -moz-background-origin:padding-box; /* For Firefox */
- -webkit-background-origin:padding-box; /* For Chrome, Safari */
- -o-background-origin:padding-box; /* For Opera */
- -ms-background-origin:padding-box; /* For IE */
- background-origin:padding-box; /* For Future */
- }
以content(即从content开始)为原点计算背景图的background-position:
- #background-origin-content{
- -moz-background-origin:content-box; /* For Firefox */
- -webkit-background-origin:content-box; /* For Chrome, Safari */
- -o-background-origin:content-box; /* For Opera */
- -ms-background-origin:content-box; /* For IE */
- background-origin:content-box; /* For Future */
- }
图片背景尺寸
- background-size:[length|percentage|auto]{1,2}|cover|contain
用于设置背景图片的大小,有2个可选值,第1个值用于指定背景图的width,第2个值用于指定背景图的height,如果只指定1个值得,则第2个值默认为auto
数值表示方式:
- #background-size{
- background-size:300px 100px;
- }
百分比表示方式:
- #background-size2{
- background-size:40% 80%;
- }
等比扩展图片来填满元素,即cover值:
- #background-size3{
- background-size:cover;
- }
等比缩小图片来适应元素的尺寸,即contain值:
- #background-size4{
- background-size:contain;
- }
以图片自身大小来填充元素,即auto值:
- #background-size5{
- background-size:auto;
- }
黑松山资源网 Design By www.paidiu.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
黑松山资源网 Design By www.paidiu.com
暂无评论...
更新日志
2024年09月20日
2024年09月20日
- 魏新雨《为你祈祷+新歌精逊2CD[WAV]
- 影心、明萨拉你选哪个?国外美女COS《博德3》
- 澳洲女子骑车跌入“自杀树”丛 疼痛持续9个月崩溃
- 育碧公布2024“她创力”计划:为女性游戏人提供辅导
- 刘美君.2017-千色·30总选3CD【环球】【WAV+CUE】
- 群星.2022-星河长明电视原声带【乐有奇思】【FLAC分轨】
- 陈淑桦.1995-淑桦盛开Forever【滚石】【WAV+CUE】
- 《再来一张》评测:出师成败皆系“赌”
- 《银河汉堡店》测评:我是银河走菜王!
- 《末日地带2》评测:酣畅淋漓的“和面”之旅
- 萧煌奇《没事的》[320K/MP3][96.22MB]
- 萧煌奇《没事的》[FLAC/分轨][263.38MB]
- 群星《音你而来 第6期》[320K/MP3][90.61MB]
- 交错战线爬塔攻略一览
- 战锤40K星际战士2全近战武器使用教学|近战武器连招表