当前位置: 首页 > wzjs >正文

建网站一年要多少钱房地产政策最新消息2022

建网站一年要多少钱,房地产政策最新消息2022,学校建设网站目标,最新外贸电商平台CSS Background 相关属性详解 CSS 提供了丰富的背景属性,用于控制元素的背景样式。以下是所有 background 相关属性的详细介绍: 1. 基础背景属性 background-color - 背景颜色 div {background-color: #ff0000; /* 十六进制 */background-color: …

CSS Background 相关属性详解

CSS 提供了丰富的背景属性,用于控制元素的背景样式。以下是所有 background 相关属性的详细介绍:

1. 基础背景属性

background-color - 背景颜色

div {background-color: #ff0000;    /* 十六进制 */background-color: rgb(255,0,0); /* RGB */background-color: rgba(255,0,0,0.5); /* RGBA(带透明度) */background-color: red;        /* 颜色名称 */background-color: transparent; /* 透明 */
}

background-image - 背景图片

div {background-image: url("image.jpg"); /* 图片路径 */background-image: linear-gradient(to right, red, yellow); /* 渐变 */background-image: none; /* 无背景图 */
}

background-repeat - 背景重复方式

div {background-repeat: repeat;    /* 默认,平铺重复 */background-repeat: repeat-x;  /* 仅水平重复 */background-repeat: repeat-y;  /* 仅垂直重复 */background-repeat: no-repeat; /* 不重复 */background-repeat: space;     /* 均匀分布不裁剪 */background-repeat: round;     /* 缩放适应不空白 */
}

background-position - 背景位置

div {background-position: center;  /* 居中 */background-position: left top; /* 左上 */background-position: 50% 50%; /* 百分比定位 */background-position: 20px 40px; /* 像素定位 */
}

background-size - 背景尺寸

div {background-size: auto;        /* 原始尺寸 */background-size: cover;       /* 覆盖整个区域 */background-size: contain;     /* 完整显示 */background-size: 50% 80%;    /* 宽度50%,高度80% */background-size: 300px 200px; /* 固定尺寸 */
}

background-attachment - 背景附着方式

div {background-attachment: scroll; /* 默认,随内容滚动 */background-attachment: fixed;  /* 固定于视口 */background-attachment: local;  /* 随元素内容滚动 */
}

2. 复合属性

background - 简写属性

div {/* 顺序:color image position/size repeat attachment origin clip */background: #ff0000 url("image.jpg") center/cover no-repeat fixed;
}

3. 高级背景属性

background-origin - 背景定位区域

div {background-origin: padding-box; /* 相对于内边距框定位 */background-origin: border-box;  /* 相对于边框框定位 */background-origin: content-box; /* 相对于内容框定位 */
}

background-clip - 背景绘制区域

div {background-clip: border-box;  /* 延伸到边框 */background-clip: padding-box; /* 延伸到内边距 */background-clip: content-box; /* 仅内容区域 */background-clip: text;        /* 文字镂空效果(需配合text-fill-color) */
}![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/5fc6c8eb80614da09bc8e88d1bffe6e7.png#pic_center)

在这里插入图片描述

background-blend-mode - 背景混合模式

div {background-blend-mode: normal;    /* 正常 */background-blend-mode: multiply;  /* 正片叠底 */background-blend-mode: screen;    /* 滤色 */background-blend-mode: overlay;   /* 叠加 */background-blend-mode: darken;    /* 变暗 */background-blend-mode: lighten;   /* 变亮 *//* 共16种混合模式 */
}

4. 多背景图

CSS3 支持为一个元素设置多个背景:

div {background-image: url("image1.png"), url("image2.jpg");background-position: left top, center center;background-repeat: no-repeat, repeat;background-size: 100px 100px, cover;
}

5. 渐变背景

线性渐变 (linear-gradient)

div {background: linear-gradient(to right, red, yellow);background: linear-gradient(45deg, red, orange, yellow);background: linear-gradient(to right, rgba(255,0,0,0), rgba(255,0,0,1));
}

径向渐变 (radial-gradient)

div {background: radial-gradient(circle, red, yellow);background: radial-gradient(ellipse at center, red 0%, yellow 70%, green 100%);
}

锥形渐变 (conic-gradient)

div {background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);background: conic-gradient(from 45deg, red, orange, yellow);
}

6. 实际应用示例

全屏背景图

.fullscreen-bg {background: url("large-image.jpg") no-repeat center center fixed;background-size: cover;height: 100vh;
}

文字背景效果

.text-bg {background: linear-gradient(to right, red, blue);-webkit-background-clip: text;background-clip: text;color: transparent;
}

图案背景

.pattern-bg {background-color: #e5e5f7;background-image: linear-gradient(#444cf7 1px, transparent 1px),linear-gradient(to right, #444cf7 1px, #e5e5f7 1px);background-size: 20px 20px;
}

浏览器兼容性提示

  1. 渐变背景在IE10+支持
  2. background-clip: text 需要 -webkit- 前缀
  3. 多背景在IE9+支持
  4. 锥形渐变较新,需检查兼容性

这些背景属性可以组合使用,创造出丰富的视觉效果,是网页设计中不可或缺的工具。


文章转载自:

http://VVJsYWhC.bxbnf.cn
http://8t9zh3gw.bxbnf.cn
http://IuZ9GsY9.bxbnf.cn
http://nK5ieDRb.bxbnf.cn
http://NyX3jynQ.bxbnf.cn
http://uesdAVGE.bxbnf.cn
http://clXMdCcz.bxbnf.cn
http://lo7Ub4t1.bxbnf.cn
http://0aO6jjIr.bxbnf.cn
http://DRHxtzKh.bxbnf.cn
http://0hmlW7TB.bxbnf.cn
http://PihXwB5B.bxbnf.cn
http://sTelAbgG.bxbnf.cn
http://xY4DSxzz.bxbnf.cn
http://KHzo3HFx.bxbnf.cn
http://GlQrDC25.bxbnf.cn
http://KtTZw5kp.bxbnf.cn
http://FsiS9OdH.bxbnf.cn
http://Ptg9JF0L.bxbnf.cn
http://jzTYS4r6.bxbnf.cn
http://Z0lomG99.bxbnf.cn
http://VxoRVS2U.bxbnf.cn
http://CuhKZ4td.bxbnf.cn
http://D6h7sPRG.bxbnf.cn
http://7mWE97yb.bxbnf.cn
http://dA48Zb6w.bxbnf.cn
http://Ql6B5BtG.bxbnf.cn
http://l2iWGFfg.bxbnf.cn
http://DmuKBpyc.bxbnf.cn
http://FNgZHutK.bxbnf.cn
http://www.dtcms.com/wzjs/665955.html

相关文章:

  • 建设招标网官方网站电脑版大连建设工程
  • 网站开发环境是什么360怎么变成建设银行首选网站
  • seo首页网站天津做网站优化哪家好
  • 广州网站关键字优化网站建设案例好么
  • 承德市网站开发厦门做网站最好的公司
  • 提高网站权重的方法阿里云服务器 个人网站
  • 好的建网站的公司易记域名网站大全
  • 做一个网站维护多少钱wordpress 防盗链
  • 网站开发必须要搭建环境吗wordpress删除月份归档
  • 响应式网站工具wordpress开发手册下载地址
  • 怎样把自己做的网页放在网站里国内新闻最新消息10条
  • 惠州做棋牌网站建设哪家便宜企业微信小程序如何开发
  • wordpress主题google朝阳seo排名
  • 衡水商城网站建设厦门网页设计代做
  • 学校网站建设交流汇报网站自然排名怎么优化
  • 一个大学网站做的好坏于否的标准怎么样做一个个人网站
  • 品牌网站建设 蝌蚪小7抖抈短视频app下载安装
  • 不用下载就能看的网站的浏览器河南专业网站建设
  • 搭建免费网站小程序可以用手机网站吗
  • 给网站可以怎么做外链网站根目录是哪里
  • 南京网站建设知识搜了网
  • 黄石网站制作公司wordpress快速配图
  • 国家级示范职业学校 建设网站PHP网站建设项目经验
  • 域名买完后如何做网站刚刚大连发布紧急通知
  • 网站建站和维护广州必去十大景点排名
  • 网站开发流程比较合理企业管理培训课程定制
  • 做侵权视频网站自己怎样做广告链接
  • 淘宝网站制作多少钱长春网站建设技术托管
  • php网站开发用什么ide湘潭网站建设企业
  • 网站域名查企业邮箱自适应网站建设电话