css实现重复渐变的边框
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Carver玩转css</title>
<style>
.container {
padding: 10px;
background: #fff;
}
.card {
width: 300px;
margin: 0 auto;
color: #333;
font-style: italic;
line-height: 1.8;
border-radius: 10px;
background: repeating-linear-gradient(
-45deg,
#f3ec78 0px 10px,
#af4261 10px 20px,
#75adf8 20px 30px,
#fff 30px 40px
) 0px 20px/200% 200%;
padding: 3px;
transition: 1s;
}
.card:hover {
background-position: 0 0;
}
</style>
</head>
<body>
<div>
<div class="card">
<div class="container">
hello world
重复渐变的边框重复渐变的边框
重复渐变的边框重复渐变的边框
重复渐变的边框重复渐变的边框
</div>
</div>
</div>
</body>
</html>
本文来自博客园,作者:Carvers,转载请注明原文链接:https://www.cnblogs.com/carver/articles/17691384.html

浙公网安备 33010602011771号