유성을 사용하여 CSS에서 변수를 선언하는 가장 쉬운 방법은 무엇입니까? 두 개의 CSS 컴파일러 인 SASS와 LESS 사이에서 변수 선언을 허용 할 수 있으므로 정확한 값을 정의 할 필요가없고 대신 변수를 제어 할 수 있습니다. 예를 들어 ...css가 유성을 사용하여 변수를 선언합니다.
variableNameOne: value;
variableNameTwo: value;
.sidebar-nav li a {
color: variableNameOne;
}
나는 css에서 이보다 진보 된 것을 원하지 않습니다. 유성에 boootstrap을 사용하고 있습니다.
CSS3는 스타일 시트의 맨 위에있는 변수를 선언하여 변수를 지원합니다 (root {varName : value;}). 그러나 모든 브라우저에서 지원되는 것은 아닙니다.
nemo64의 부트 스트랩 이하를 설치하는 것이 가장 좋은 방법입니까? 당신이 다시 가고 싶지 않을 것입니다 그것을 사용하기 시작하면 내가 강하게하는 CSS 프리 D 파일러를 사용하여 권합니다 http://www.manuel-schoebel.com/blog/meteorjs-and-twitter-bootstrap---the-right-way
// 1. Add the less compiler so meteor compiles everything for you
meteor add less
// 2. Add the bootstrap
meteor add nemo64:bootstrap
// 3. Clone this stylesheet boiler
// Also delete the .git folder and .gitignore if you don't like those
cd yourapp/client/
git clone https://github.com/DerMambo/stylesheets.git
// 4. Add everything you need into the file
// yourapp/client/vendor/custom.bootstrap.json
Sass 또는 LESS에 대한 연구를 해보고 어떤 것이 변수를 지원하는지보십시오. – cimmanon