:last-child pseudo class selector in CSS and Internet Explorer

前端 未结 4 583
天命终不由人
天命终不由人 2020-12-09 23:05

I have the following code:

ul.myList li{
     border-right: 1px dotted #000;
}

However, on the last element, I need to remove that border a

4条回答
  •  醉梦人生
    2020-12-09 23:18

    You can do this using jQuery. So instead of relying on CSS. Use jQuery Selectors to set the property of your last element. I understand that u havent tagged your question with it.

    jQuery('ul.myList li:last-child').css("Key","value");
    

提交回复
热议问题