0
我有以下SASS代碼如何訪問:元素之前?
a.unfavorite{
width: 20px;
background-position: -71px -28px;
text-decoration: none !important;
&:before {
content: "un-favorite";
background: #000;
color: #fff;
}
}
jQuery中,我希望能夠訪問:before
元件,以便修改。
我試過做這樣的事情$('.unfavorite:before')
但沒有結果。我做錯了嗎?
參見:http://stackoverflow.com/questions/622122/how-can-i-change-the- css-class-rules-using-jquery –