【发布时间】:2017-11-13 04:10:46
【问题描述】:
我试图弄清楚如何影响具有特定孩子的父类。据我所知,这在 CSS3 中是不可能的,但在 jQuery 中可能是可能的。
这里是父类.home .x-navbar
这里是子类.x-btn-navbar
我要添加到父类的CSS:
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%,rgba(0, 0, 0, 0.8) 50%,rgba(0, 0, 0, 0.8) 100%) !important;
background: -webkit-linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%,rgba(0, 0, 0, 0.37) 50%,rgba(0, 0, 0, 0) 100%) !important;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%,rgba(0, 0, 0, 0.8) 50%,rgba(0, 0, 0, 0.8) 100%) !important;
当它有一个特定的孩子时,我需要什么 jQuery 代码来影响父类 css?
【问题讨论】:
标签: jquery html css background