css渐变色不生效,为什么渐变出不来,css3

html>

Document

/*css document*/

body,ul,ol,dl,dd,h1,h2,h3,h4,h5,h6,p,input,select,textarea,form{margin: 0; padding: 0;}

body{font:14px/1.5 "宋体";}

img{border:none;}

ul,ol{list-style:none;}

input,select,textarea{outline:none;border:none;background:none;}

textarea{resize:none;}

a{text-decoration:none;display:block;}

@keyframes rond {

0% {transform : rotate(0deg);}

100% {transform : rotate(360deg);}

}

.div_all{

width: 800px;

height: 800px;

position: absolute;

top: 220px;

left: 600px;

}

.div1{

width: 200px;

height:200px;

border-radius: 50%;

background-color: radial-gradient(circle, #00FFC4, #00F7FF,#00CEFF,#0F00FF);

}

.div2{

width: 150px;

height:150px;

border-radius: 50%;

background-color: radial-gradient(circle, #FFF200, #B4FF00,#FFFFFF);

position: absolute;

top: 25px;

left: 25px;

}

.div3{

width: 100px;

height:100px;

border-radius: 50%;

background:radial-gradient(circle, #f00, #ff0, #080);

position: absolute;

top: 25px;

left: 25px;

animation-iteration-count: infinite; /*无限播放*/

animation-timing-function: linear;

}

.div4{

width: 20px;

height: 200px;

background-color: #F6E50C;

position: absolute;

top: 150px;

left: 90px;

z-index: -1;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
微信小程序的 `tabBar` 组件是一个系统级组件,它的样式是由系统控制的,因此无法直接通过设置 `rgba` 背景色来改变其背景色。不过,你可以通过以下几种方法来实现自定义背景色的效果: 1. 使用 `backgroundColor` 属性 在 `app.json` 中设置 `tabBar` 的 `backgroundColor` 属性即可改变其背景色。该属性支持十六进制颜色值、RGB 颜色值和关键词等多种设置方式,例如: ```json { "tabBar": { "backgroundColor": "#ffffff" } } ``` 2. 使用 `background-color` 样式 在 `app.wxss` 中设置 `.custom-tab-bar` 样式,并在 `tabBar` 中添加 `custom-tab-bar` 类名即可改变其背景色。例如: ```css .custom-tab-bar { background-color: rgba(255, 255, 255, 0.5); } ``` ```json { "tabBar": { "list": [ { "pagePath": "pages/index/index", "text": "首页", "iconPath": "images/tabbar/home.png", "selectedIconPath": "images/tabbar/home-active.png", "clas": "custom-tab-bar" }, // ... ] } } ``` 3. 使用 `background-image` 样式 在 `app.wxss` 中设置 `.custom-tab-bar` 样式,并使用 `linear-gradient` 函数来创建一个渐变背景。例如: ```css .custom-tab-bar { background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)); } ``` ```json { "tabBar": { "list": [ { "pagePath": "pages/index/index", "text": "首页", "iconPath": "images/tabbar/home.png", "selectedIconPath": "images/tabbar/home-active.png", "clas": "custom-tab-bar" }, // ... ] } } ``` 希望这些方法能够帮助你解决问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值