Home  >  Article  >  Web Front-end  >  css selects the first to second to last element_html/css_WEB-ITnose

css selects the first to second to last element_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:26:392731browse

css ie8

I now want to set the height of tr. There are 9 trs. How can I use css to select the first eight and set them to height: 90px; and set the last one to 40px?
It is required to be compatible with at least ie8

Reply to discussion (solution)

$("tr").css("height","90px");$("tr:last").css("height","40px");

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn