Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 动态创建带有渐变的箭头_Css - Fatal编程技术网

Css 动态创建带有渐变的箭头

Css 动态创建带有渐变的箭头,css,Css,如何在CSS3中动态生成这样的形状: 忽略边界,因为重要方面包括: - The gradient in the arrow body, and that the gradient lasts from the tip to the end of the arrow. - The length of the square part will vary. 我尝试了常规的:在方法之后,在div元素的末尾添加一个三角形,但是我无法获得适当跨越尖端和主体的渐变 小提琴:你可以试试这样的东西- div{

如何在CSS3中动态生成这样的形状:

忽略边界,因为重要方面包括:

- The gradient in the arrow body, and that the gradient lasts from the tip to the end of the arrow.
- The length of the square part will vary.
我尝试了常规的
:在
方法之后,在
div
元素的末尾添加一个三角形,但是我无法获得适当跨越尖端和主体的渐变


小提琴:你可以试试这样的东西-

div{
宽度:50px;
高度:100px;
位置:相对位置;
利润率:100像素;
背景:-webkit线性梯度(顶部,#1e5799 0%,#2989d8 100%);
背景:-moz线性梯度(顶部,#1e5799 0%,#2989d8 100%);
}
部门:之后{
z指数:-1;
内容:“;
显示:块;
位置:绝对位置;
左:-125px;
顶部:-51px;
利润率:100像素;
高度:100px;
宽度:100px;
背景:#c00;
-webkit变换:旋转(-45度);
-moz变换:旋转(-45度);
变换:旋转(-45度);
背景:-webkit线性梯度(45度,#1e5799 0%,#2989d8 50%,#ffffff 50%,#ffffff 100%);
背景:-莫兹线性梯度(45度,#1e5799 0%,#2989d8 50%,#ffffff 50%,#ffffff 100%);
}

谢谢您的回复。这并不完全是我想要的,但这是一个很好的妥协。谢谢