小编kas*_*kas的帖子

如何为图标赋予渐变色?

我正在尝试为图标添加渐变色。虽然这适用于文本标签,但对我来说不适用于图标。任何建议将不胜感激。

.way_icon h3{
	font-size: 40px;      
	background:-moz-linear-gradient(top, #e72c83 0%, #a742c6 100%); 
    background: -webkit-linear-gradient(top, #e72c83 0%,#a742c6 100%); 
    background: linear-gradient(to bottom, #e72c83 0%,#a742c6 100%);
    -webkit-background-clip: text;
    -moz-background-clip: text;
    background-clip: text;
   -webkit-text-fill-color:transparent;
Run Code Online (Sandbox Code Playgroud)
<div class="way_icon">
  <h3>jfkfjfjr<i class="ion-ios-gear"></i></h3>
  <a href="#"><i class="ion-ios-gear"></i></a>
</div>
<link href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet"/>
Run Code Online (Sandbox Code Playgroud)

html css

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

标签 统计

css ×1

html ×1