更改DIV:边框右侧颜色的jQuery后 [英] Change the div:after border right color by jQuery
本文介绍了更改DIV:边框右侧颜色的jQuery后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何改变边框正确的颜色类:在
这的CSS正常
.profile文件,选择一个div:后{
边框颜色:透明#999999透明透明;
边框风格:固体;
边框宽度:18像素;
内容: ;
显示:块;
左:-15px;
的margin-top:-33px;
位置:绝对的;
的z-index:999;}
和我需要设置#999999到#333333当jQuery的选择
我想这些,但似乎无法正常工作
$(配置文件选项一个div:后)的CSS({borderRightColor:#999});
$(。yourOptions1:后)的CSS({borderRightColor:#333});
通过使用JQuery:(后)
解决方案
您不能改变的风格。 但是你可以通过使用DIV后的HTML插入DIV解决 那么你就可以处理它使用JQuery
< DIV CLASS =mydiv_1>< / DIV> < DIV CLASS =after_div>< / DIV>
< DIV CLASS =mydiv_2>< / DIV> < DIV CLASS =after_div>< / DIV>
How to change border right color to class:after
this css the normal
.profile-options a div:after {
border-color: transparent #999999 transparent transparent;
border-style: solid;
border-width: 18px;
content: "";
display: block;
left: -15px;
margin-top: -33px;
position: absolute;
z-index: 999;}
and I need to set the #999999 to #333333 when selected by jquery
I tried those but it seems not working
$(".profile-options a div:after").css({"borderRightColor":"#999"});
$(".yourOptions1:after").css({"borderRightColor":"#333"});
解决方案
You cant change the style of the (:after) by using JQuery. but you can solve it by inserting DIV in HTML after the DIV that you use then you can handle it using JQuery
<div class="mydiv_1"></div> <div class="after_div"></div>
<div class="mydiv_2"></div> <div class="after_div"></div>
这篇关于更改DIV:边框右侧颜色的jQuery后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文