失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > CSS3做出条纹大背景

CSS3做出条纹大背景

时间:2024-02-23 10:44:20

相关推荐

CSS3做出条纹大背景

web前端|css教程

CSS3,样式表,css

web前端-css教程1. 实现不等宽背景条纹:

dnf vb吸物源码,vscode怎么保存所以代码,ubuntu内存分配,tomcat启动打开网页,sqlite full,企业介绍手机网页设计,安装 dedecmsv57 数据库不存在,linux服务器wordpress建站教程视频,批量复制文件名插件,alibaba前端框架,对爬虫法律,php缓冲,论坛怎么seo,springboot多并发,alt . 闭合当前标签,aspcms网站使用教程,js获得网页图片,asp个人主页模板下载,用户权限后台管理展示,jquery 动画页面背景,班级管理系统php源码,asp问答系统程序代码lzw

易语言身份证号码源码,vscode怎样添加库,ubuntu凤凰os,tomcat登入403,sqlite一张表记录数,一般公司会查爬虫吗知乎,php小说程序,seo渠道管理岗位描述,css网站导航模板,php168手机模板lzw

.cont{width: 500px;height: 200px;background: linear-gradient(#78C9DB 70%,#0acf00 0%);background-size: 100% 20px;}

如果想设置等宽的渐变只需要将开始值和结束值改为互补

品牌html源码,ubuntu 反汇编指令,tomcat运行一个项目,大专学历爬虫开发,企业微信开发文档PHP,剪板机seolzw

如果你需要等宽切无过渡的渐变,开始和结束值设置为50%即可。

如果你想要垂直条纹,你只需要调整background-size的x、y值即可。

2.瓷砖条纹背景

.cont{width:500px;height:200px;background:linear-gradient(45deg,#78C9DB 50%,#0acf00 50%);background-size:30px 30px;}

3. 草地背景

.cont{width:500px;height:200px;background:linear-gradient(-45deg,#0acf00 50%,#78C9DB 50%);background-size:30px 100%;}

4. 斜条纹背景

.cont{width:500px;height:200px;background:linear-gradient(-45deg,#0acf00 25%,#78C9DB 0,#78C9DB 50%,#0acf00 0,#0acf00 75%,#78C9DB 0);/*background:repeating-linear-gradient(-45deg,#0acf00,#0acf00 15px,#78C9DB 0,#78C9DB 30px);*/效果相同 background-size: 30px 30px;}

5.单色斜条纹背景(利用透明度及transparent)

.cont{width:500px;height:200px;background:#fff repeating-linear-gradient(30deg,rgba(0,0,0,.5),rgba(0,0,0,.5)15px,transparent 0,transparent 30px);}

6. 格子衫背景

.cont{width:500px;height:200px;background:#fff;background: linear-gradient(90deg,rgba(100,0,0,.5) 50%,transparent 0),linear-gradient(rgba(100,0,0,.5) 50%,transparent 0);background-size: 30px 30px;}

7.波点背景

.cont{margin:50px;width:500px;height:200px;background:#a95f44;background-image:radial-gradient(#fff 30%,transparent 0),radial-gradient(#fff 30%,transparent 0);background-size:20px 20px;background-position:0 0,10px 10px; // 必须是background-size尺寸的1/2}

8.棋盘背景

.cont{width:500px;height:200px;background: #fff;background-image:linear-gradient(45deg,#a95f44 26%,transparent 0,transparent 75%,#a95f44 0),linear-gradient(45deg,#a95f44 26%,transparent 0,transparent 75%,#a95f44 0);background-size:30px 30px;background-position:0 0,15px 15px;}

如果觉得《CSS3做出条纹大背景》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。