两侧有多个边缘的背景
background with multiple edges on the sides
我想要和图片类似的东西。1
我目前的进度是:
只是一个被 p 标签包围的字符串。应该在一侧有圆边和两种不同的颜色
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Borda</title>
<style>
.div-chat-i {
color:rgb(255, 251, 251);
background: radial-gradient(circle at left, rgb(209, 231, 82) 5%, rgb(17, 158, 48) 5% 10%, rgb(44, 41, 228) 10% 100%);
padding: 5px 10px;
border-radius: 10px;
min-width: 15%;
max-width: 20%;
text-align: center;
}
</style>
</head>
<body>
<div class="div-chat-i">
<p>Lorem, ipsum dolor.Lorem.</p>
</div>
</body>
</html>
box-shadow 可以做到这一点:
.box {
width:200px;
height:50px;
border-radius:50px;
margin:50px;
background:blue;
box-shadow:
-10px 0 0 red,
-20px 0 0 green;
}
<div class="box"></div>
我想要和图片类似的东西。1
我目前的进度是:
只是一个被 p 标签包围的字符串。应该在一侧有圆边和两种不同的颜色
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Borda</title>
<style>
.div-chat-i {
color:rgb(255, 251, 251);
background: radial-gradient(circle at left, rgb(209, 231, 82) 5%, rgb(17, 158, 48) 5% 10%, rgb(44, 41, 228) 10% 100%);
padding: 5px 10px;
border-radius: 10px;
min-width: 15%;
max-width: 20%;
text-align: center;
}
</style>
</head>
<body>
<div class="div-chat-i">
<p>Lorem, ipsum dolor.Lorem.</p>
</div>
</body>
</html>
box-shadow 可以做到这一点:
.box {
width:200px;
height:50px;
border-radius:50px;
margin:50px;
background:blue;
box-shadow:
-10px 0 0 red,
-20px 0 0 green;
}
<div class="box"></div>