[英]CSS - linear-gradient does not work in the background property
我正在嘗試使用vue-orgchart
創建一棵樹( link )
它工作正常,但我想更改節點的綠色背景(忽略白色部分)。
可以在以下鏈接中找到CSS。
我發現綠色是: #42b983
。 因此,很容易在css文件中找到它:
.orgchart .node .title {
text-align: center;
font-size: 12px;
font-weight: 300;
height: 20px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: #42b983;
color: #fff;
border-radius: 4px 4px 0 0;
}
並更改它:
background-color: linear-gradient(#66cccc, #3399cc);
但是,由於某種原因,我得到:
如果我嘗試使用其他任何顏色(不使用linear-gradient
),它將成功。
另外,我在網絡的其他部分使用了這種樣式( linear-gradient
),並且效果很好,因此瀏覽器不是問題(如果重要的話,我使用chrome)。
我該如何解決這個問題?
請把下面的代碼
background-image: linear-gradient(#66cccc, #3399cc);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.