Home > Web Front-end > HTML Tutorial > I sincerely ask a question: About nested writing of CSS_html/css_WEB-ITnose

I sincerely ask a question: About nested writing of CSS_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:46:46
Original
1126 people have browsed it

<!DOCTYPE ><html xmlns="http://www.w3.org/1999/xhtml"> <head>  <title> new document </title>  <meta name="generator" content="editplus" />  <meta name="author" content="" />  <meta name="keywords" content="" />  <meta name="description" content="" />  <style type="text/css">	.d{		.s{			color:red;		}	}	/*.d .s{		color:red;	}*/  </style> </head> <body>	<div id="" class="d">		<span class="s">hello !</span>	</div> </body></html>
Copy after login


Why does this not work, but the one in the comments does?


Reply to the discussion (solution)

CSS does not have nested writing

CSS does not have nested writing


But look at this website: http://www.css2less.net/ ?

It’s less

This is not native css, it is in LESS format. You need to load a less.js compiler to compile the LESS file into a static CSS file and apply it in the HTML document.

You can take a look at this
http://www.ibm.com/developerworks/cn/web/1207_zhaoch_lesscss/

It’s less

This is not native css, it is in LESS format. A less.js compiler needs to be loaded to compile the LESS file into a static CSS file and apply it in the HTML document.

You can take a look at this
http://www.ibm.com/developerworks/cn/web/1207_zhaoch_lesscss/



Thank you very much, I understand. This has always worked before Confused.
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template