javascript - html/css3 - 曲线

标签 javascript html css

我需要帮助在 css3/html5 中创建一条边缘渐变的曲线,如图像 curved line

我一直在看这个例子from codepen但边缘没有褪色

.box{
  width:500px; height:100px;  
  border:solid 5px #000;
  border-color:#000 transparent transparent transparent;
  border-radius: 50%/100px 100px 0 0;
}
 <div class="box"></div>

有可能吗?

最佳答案

只需将其复制粘贴到您的 HTML

.box{
	width: 400px;
	height: 200px;
	background: #F98821;
	-moz-border-radius: 200px / 91px;
	-webkit-border-radius: 200px / 91px;
	border-radius: 200px / 91px;	
}

.box:before {
	content: '';
	width: 400px;
	height: 200px;
	background: #fff;
	-moz-border-radius: 193px / 70px;
	-webkit-border-radius: 193px / 70px;
	border-radius: 193px / 70px;
	top:13px;
	position: absolute;
}
<div class="box"></div>

关于javascript - html/css3 - 曲线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39673836/

相关文章:

javascript - 由于 Visual Studio MVC 中的 div,CSS 未加载

javascript - YUI 自动完成.........需要从 javascript 更改 z-index 值

html - 如何在样式表链接标签中正确使用 title 属性

PHP 提交按钮不起作用。

css - Fontello 到 Wordpress

javascript - 没有提交表单的bootstrap html点击按钮

javascript - Puppeteer 检测新选项卡何时打开并获取页面对象

javascript - jQuery 选择器获取未知深度下的(第 n 个)元素?

html - CSS3 高度 100%

javascript - CSS 过渡不适用于 classList.add