//Extend the Pseudo-class of the extendless, combining the selector and placing it on the selector that matches it reference use Method: Take the style of extending test on study as an example. Test{Color:#000000;font-size:18px;}//grammar 1.study{&:extend (. Test);background:Red;}//grammar 2.study:extend (. Test){background:Red;}//Output Css.test,.study{Color:#000000;font-size:18px;}. Study{background:Red;}//Extension Alluse Method: To extend the test on study as an example when there is all, it is extended together with all the children under test. Test{Color:#000000;font-size:18px;li{Width:50px;Height:50px;background:Red; }}//grammar 1.study:extend (. Test all){}//grammar 2.test{&:extend (. Test all);}//Output Css.test,.study{Color:#000000;font-size:18px;}. Test Li,.study Li{width:50px;Height:50px;background:Red;}when none is expanded only the selected selector style//grammar 1.study:extend (. Test){}//grammar 2.study{&:extend (. Test);}//Output Css.test,.study{Color:#000000;font-size:18px;}. Test Li{width:50px;Height:50px;background:Red;}Summary: The extension, in short, is a common style in CSS The above example illustrates: study has the exact same style as in Test, in order to simplify the code, we extend the study directly
Leona
Original link: http://www.cnblogs.com/leona-d/p/6296162.html
Copyright NOTICE: This article is copyright to the author and the blog Park is shared, welcome to reprint, but without the consent of the author must retain this statement, and in the article page obvious location to give the original link
LESS-CSS Base Extension