我工作的一個項目,但我無法找到一個方法來選擇儀表板選擇標籤的最後一個孩子
<div class="dashboard">
<div class="grid_6 alpha">
<div class="grid_6 omega">
<div class="grid_6 alpha">
<div class="grid_6 omega">
<div class="grid_6 alpha">
<div class="grid_6 omega"> //i wanna select this
<div class="clear"></div>
</div>
我試過的最後孩子
.dashboard:last-child
.omega:last-child
看這個SO搜索結果:http://stackoverflow.com/search?q=css+last+element,你的答案就在這裏:stackoverflow.com/questions/10415016/is-it-possible- to-target-the-very-last-list-element-in-css/10415207#10415066和google:https://www.google.ca/#gs_rn=21&gs_ri=psy-ab&cp=19&gs_id=cn&xhr=t&q=css +選擇器+最後+元素 –
http://www.w3schools.com/cssref/tryit.asp?filename=trycss3_nth-last-child –
請考慮避免使用空標記進行造型。 – fcalderan