如何使css渐变停止后这么多像素? [英] how to make a css gradient stop after so many pixels?
本文介绍了如何使css渐变停止后这么多像素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-moz-radial-gradient(center -200px , ellipse farthest-corner, #323C49 0%, #718299 65%) no-repeat scroll 0 0 transparent;
我有上面的代码,我只是意识到这个梯度从顶部到底部。有什么办法让它停止整个渐变后30px。我可以根据需要进行调整,但是如何在30px之后让渐变完成呢?
I have this code above and i just realized that this gradient goes from top to bottom. Is there any way to make it stop the whole gradient after 30px. I can make adjustments as necessary, but how do you get the gradients to complete itself after 30px?
推荐答案
-size属性。
如下:
div {
height:100px;
background:-moz-radial-gradient(center, ellipse farthest-corner, #323C49 0%, #718299 65%) no-repeat;
background-size:auto 30px;
}
这篇关于如何使css渐变停止后这么多像素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文