1 Star 0 Fork 1.2K

zhouhe/css效果图收集

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.html 2.43 KB
一键复制 编辑 原始数据 按行查看 历史
qianming 提交于 2020-09-28 10:49 . 加入右上角标签
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.container {
height: 500px;
width: 500px;
padding-top: 100px;
}
.rectangle2 {
margin-top: 50px;
height: 100px;
width: 300px;
background: linear-gradient(-75deg, transparent 30px, #58a 0) right,
linear-gradient(75deg, transparent 30px, #58a 0) left;
background-size: 50% 100%;
background-repeat: no-repeat;
}
.rectangle {
position: relative;
height: 300px;
width: 300px;
/* background: #58a; */
background: linear-gradient(-45deg, transparent 7.5px, #58a 0) right,
linear-gradient(45deg, transparent 7.5px, #58a 0) left;
/* clip-path: polygon(
0 0,
100% 0,
100% calc(100% - 12.5px),
calc(100% - 12.5px) 100%,
12.5px 100%,
0 calc(100% - 12.5px)
); */
background-size: 50% 100%;
background-repeat: no-repeat;
border: 1px solid blue;
/* border-right: 1px solid red; */
}
.rectangle::before {
position: absolute;
content: "";
width: 16px;
height: 16px;
bottom: -8px;
left: -8px;
transform: rotate(46deg);
background: transparent;
border-top: 1px solid blue;
}
.rectangle::after {
position: absolute;
content: "";
width: 16px;
height: 16px;
bottom: -8px;
right: -8px;
transform: rotate(46deg);
background: transparent;
border-left: 1px solid blue;
}
.rectangle3 {
position: relative;
margin-top: 50px;
margin-left: 50px;
height: 100px;
width: 300px;
background: #58a;
}
.rectangle3::before {
position: absolute;
content: "";
right: -20px;
bottom: 0;
width: 0;
height: 0;
border-bottom: 100px solid transparent;
border-left: 20px solid #000000;
}
.rectangle3::after {
position: absolute;
content: "";
left: -30px;
bottom: 0;
width: 0;
height: 0;
border-bottom: 100px solid transparent;
border-right: 30px solid rgba(0,0,0,0.5);
}
</style>
</head>
<body>
<div class="container">
<div class="rectangle"></div>
<div class="rectangle2"></div>
<div class="rectangle3"></div>
</div>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
CSS
1
https://gitee.com/biezhoumei/css_effect_map_collection.git
git@gitee.com:biezhoumei/css_effect_map_collection.git
biezhoumei
css_effect_map_collection
css效果图收集
master

搜索帮助