相关疑难解决方法(0)

与css的波浪形状

我正在尝试使用CSS重新创建此图像:

方式的形状

我不需要重复.这就是我的开始,但它只是一条直线:

#wave {
  position: absolute;
  height: 70px;
  width: 600px;
  background: #e0efe3;
}
Run Code Online (Sandbox Code Playgroud)
<div id="wave"></div>
Run Code Online (Sandbox Code Playgroud)

css css3 css-shapes

65
推荐指数
6
解决办法
11万
查看次数

在CSS中两个渐变div之间创建曲线的好方法?

我有两个具有不同渐变背景的div,我需要在它们之间创建一个S形曲线.

在此输入图像描述

这是渐变div的示例小提琴:https://jsfiddle.net/JerryGoyal/rjyfc46c/2/

<div id="section1">

</div>
<div id="section2">

</div>
#section1{
  height:200px;
  background: linear-gradient(to bottom right, #ad3, #add);
}
#section2{
  height:200px;
  background: linear-gradient(to bottom right, #de350b, #0065ff);
}
Run Code Online (Sandbox Code Playgroud)

我想到了几件事情,但是:

- svg:不知道如何处理其他渐变div.
- border-radius:无法获得真正类似S的曲线加上当我调整屏幕大小时它会变得难看.
- clip-path:某些浏览器不支持https://caniuse.com/css-clip-path
- png image: nope!需要是动态内容.

任何帮助,将不胜感激!


PS:未来读者必读:https://css-tricks.com/creating-non-rectangular-headers/

html css linear-gradients css-shapes

9
推荐指数
1
解决办法
682
查看次数

在 CSS 中为顶部和底部边框创建波浪边框

我正在尝试像这里的图像一样创建一个波浪形的顶部和底部边框

在此处输入图片说明

我尝试使用以下代码重新创建相同的效果

.wave{
  background: white;
  height: 25px;
  position: relative;  
}
.wave::before, .wave::after{
  border-bottom: 5px solid rgba(237, 30, 30, 1);
}
.wave::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  background-size: 20px 40px;
  background-image:
    radial-gradient(circle at 10px -15px, transparent 20px, rgba(237, 30, 30, 1) 21px);
}
.wave::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background-size: 40px 40px;
  background-image:
    radial-gradient(circle at 10px 26px, rgba(237, 30, 30, 1) 20px, transparent 21px);
}


.wavebottom{
  background: …
Run Code Online (Sandbox Code Playgroud)

html css border

5
推荐指数
1
解决办法
5289
查看次数

如何创建波浪形CSS?

请查看下面的图片,了解我要创建的内容:

在此处输入图片说明

到目前为止,我有以下内容,但它需要更加“频繁”,例如增加正弦或余弦波的频率。

#wave {
  position: relative;
  height: 70px;
  width: 600px;
  background: #e0efe3;
}

#wave:before {
  content: "";
  display: block;
  position: absolute;
  border-radius: 100% 50%;
  width: 340px;
  height: 80px;
  background-color: white;
  right: -5px;
  top: 40px;
}

#wave:after {
  content: "";
  display: block;
  position: absolute;
  border-radius: 100% 50%;
  width: 300px;
  height: 70px;
  background-color: #e0efe3;
  left: 0;
  top: 27px;
}
Run Code Online (Sandbox Code Playgroud)
<div id="wave"></div>
Run Code Online (Sandbox Code Playgroud)

html css css-shapes

3
推荐指数
1
解决办法
684
查看次数

标签 统计

css ×4

css-shapes ×3

html ×3

border ×1

css3 ×1

linear-gradients ×1