帮助中心
获取牛币
联系我们
关于我们
版权声明
素材牛首页
微博登录
QQ登录
微信扫码登录
注册
登录
新浪微博
QQ登陆
微信登录
热门搜索:
小程序
支付
Java
后台模板
上传
商城模板
jQuery
手机
Thinkphp
微信
Vue.js
首 页
网页特效
整站源码
PHP实例
网站模版
工具箱
常用代码
论坛
游戏源码
资源分享
当前位置:
首页
»
精选常用代码
» CSS制作各种图形
CSS制作各种图形
浏览:755次
-
评论:1次
-
发布时间:2020-05-27
Html
Css
Js
box1
box2
box3
box4
.box1{ width:240px; height:50px; line-height:50px; text-align:center; color:#FFF; background-color:#3598dc; background: radial-gradient( circle at top left, transparent 8px,#3598dc 0 ) top left, radial-gradient( circle at top right, transparent 8px,#3598dc 0 ) top right, radial-gradient( circle at bottom right,transparent 8px, #3598dc 0 ) bottom right, radial-gradient( circle at bottom left, transparent 8px,#3598dc 0 ) bottom left; background-size:50% 50%; background-repeat:no-repeat; } .box2{ width:240px; height:70px; /*改变高度不同的效果哦*/ line-height:70px; color:#FFF; text-align:center; background: #8BC34A; background: linear-gradient(135deg, transparent 15px, #8BC34A 0) top left, linear-gradient(-135deg, transparent 15px, #8BC34A 0) top right, linear-gradient(-45deg, transparent 15px, #8BC34A 0) bottom right, linear-gradient(45deg, transparent 15px, #8BC34A 0) bottom left; background-size: 50% 50%; background-repeat: no-repeat; } .box3 { width: 120px; height: 80px; color:#FFF; background: red; position: relative; -moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px; margin-left:20px; } .box3:before { content:""; position: absolute; right: 100%; top: 26px; width: 0; height: 0; border-top: 15px solid transparent; border-right: 25px solid red; } .box4 { width: 200px; height: 55px; line-height:55px; text-align:center; color:#FFF; background: #8BC34A; background: linear-gradient(135deg, transparent 0, #8BC34A 0) top left, linear-gradient(-135deg, transparent 20px, #8BC34A 0) top right, linear-gradient(-45deg, transparent 20px, #8BC34A 0) bottom right, linear-gradient(45deg, transparent 0, #8BC34A 0) bottom left; background-size: 50% 50%; background-repeat: no-repeat; } .box5{ width: 0; height: 0; border-right: 70px solid transparent; border-top: 70px solid #ffde00; border-left: 70px solid #ffde00; border-bottom: 70px solid #ffde00; border-top-left-radius: 70px; border-top-right-radius: 70px; border-bottom-left-radius: 70px; border-bottom-right-radius: 70px; }
↑上面代码改变,会自动显示代码结果
jQuery调用版本:
2.1.4
<!doctype html><html><head><meta charset="utf-8"><title>CSS制作各种图形-www.sucainiu.com</title><script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script><style>
</style></head><body>
<script>
</script>
</body></html>
立即下载
收藏
积分说明:注册即送10牛币,每日签到可获得5牛币,成为VIP会员可永久免牛币下载!
充值积分
充值会员
更多说明»
代码描述:纯css绘制各种图形
纯CSS滚动条
简易JS倒计时
讨论这个常用代码(1)
回答他人问题或分享心得会奖励牛币
Lv2 入门
qq***02
2021年01月01日
厉害,很棒的代码
回复
文明上网,理性发言! 😉 阿里云幸运券,
戳我领取
发表评论
提交回复
我的积分余额:
0
已下载次数:
755
所需牛币:
5
开始下载
牛币获取:
签到、评论、充值
» 在线充值
(10牛币=1元)
成为VIP可永久免积分下载全部常用代码
» 查看详情
VIP
客服
签到
充值