Css Preprocessor sass usage tutorial (Multi-image warning), sass usage tutorial
The css Preprocessor provides css dynamic language features, such as variables, functions, operations, in
Front-end css framework SASS usage tutorial (conversion), csssass1. What is SASS?
SASS is a CSS development tool that provides a lot of convenient writing methods, greatly saving the designer's time, making
called as follows:
#navbar li {@include rounded (top, left);}
#footer {@include rounded (top, left, 5px);}
4.3 Color functionsSASS provides a number of built-in color functions to generate series colors.
Lighten (#cc3, 10%)//#d6d65cDarken (#cc3, 10%)//#a3a329Grayscale (#cc3)//#808080Complement (#cc3)//#33c
4.4 Inserting files@import command to insert an external file.
@import "Path/filename.scss";
If you insert a.
Article Introduction: If you combine oocss with sass, you will get two advantages: The CSS module is not bloated and the HTML remains unchanged.
Oocss is very good. But it's not scary to have a lot of semantically incorrect class names in HTML tags. And it's interesting that the class name on the HTML tag changes. If you combine oocss with sass, you w
Used to get scss only under Ruby, Nodejs version less.js has been more mature, and sass.js (1) does not support SCSS (after the author to develop stylus ~), followed by the SCSS-JS (2) has missed the opportunity (support SCSS Syntax Limited, has not been updated for a long time).This is probably a cause of the current less in the domestic outbreak. Excluding environmental dependence, personal feeling sass than less much better, I believe many students
write, using curly braces. All sass files mentioned in this tutorial refer to files with a suffix named Scss.
ImportThe Sass Import (@import) rule differs from CSS in that it only imports different files semantically, but the end result is a CSS file. However, if you impor
Article Introduction: the use of the Sass Interface compiler tool--codekit.
In theSass compilation andnodejs+grunt configuration Sass Project Automatic compilation tutorial, we detail the translation tasks that use sass and the grunt command to complete the SASS p
Use Sass to align vertically and horizontally in CSS elegantly and efficiently (with Flex layout, CSS3 + SASS perfect edition), sasscss3
There are many ways to implement horizontal and vertical center of css. Here I will briefly describe the following four commonly used methods:
1. Use the Flex layout in CSS3
What we n
Css compilation tool Sass hybrid macro, inheritance, placeholder when to use, compilation tool sass
// Use the @ mixin mt ($ var) {margin-top: $ var ;}. block {@ include mt (5px); span {display: block; @ include mt (5px );}}. header {color: orange; @ include mt (5px); span {display: block; @ include mt (5px );}}
1. The above is the
SASS, sass tutorial
File suffixSass has two types of suffix files: sass and sass.And Semicolon. The other is the scss file we use here.The css file format is similar. Braces and semicolons are used. In this tutorialAll sass files
feature.
Sprite
I think... Sprite is the pain point of css designer! I think it's very difficult. I still need to calculate the seat level. When I change my seat level, I need to calculate the seat level again! Css again, and a change may trigger the whole body!
Wow ~ Now, Compass is all done for you! Compass is so big that it is possible to have enough data at once! As long as the images to be merged are
one row! Wherelighten(red, 20%)Is to use the sass highlight feature.
Sprite
I think... Sprite is the pain point of css designer! I think it's very difficult. I still need to calculate the seat level. When I change my seat level, I need to calculate the seat level again! Css again, and a change may trigger the whole body!
Wow ~ Now, Compass is all done for you! C
Sass extends the CSS3, adding rules, variables, mixes, selectors, inheritance, and more. Sass produces well-formatted CSS code that is easy to organize and maintain.Sass is an extension of the syntax of CSS3 (cascading style sheets), which can use nested, mixed, and sub-inheritance functions to write stylesheet more effectively and flexibly.
Article Introduction: The only thing that you really need to learn with CSS preprocessor is the syntax, Sass is written in Ruby, but the syntax of both is not related. Do not know Ruby, still can use. All you need is an application like Cudekit to observe and compile the files you write. Less is not necessary, only need to call a JS can (run on the client), or with the help of Node.js (server running
Article Introduction: This article mainly through the creation of a SASS project as an example, to lead you to use koala such a graphical interface compiler tool to your SASS project, sass file compiled into a CSS file.
The "codekit" graphical tool compiles sass
people who have studied CSS know that it is not a programming language. You can use it to develop a Web page style, but you can't program it. In other words, CSS is basically a designer's tool, not a programmer's tool. In the programmer's eyes, CSS is a very troublesome thing. It has no variables and no conditional statements ...People who have studied
write in front of the words: If you write a lot of CSS, you may wish to write CSS in a different way, may improve efficiency, sass is my favorite one. CSS is not too difficult, so it is only introduced sass common usage, to avoid complications, the follow-up to new things, y
Sass 10-minute entry variableVariables can be defined in sass to facilitate uniform modification and maintenance.//sass style//-----------------------------------$fontStack: Helvetica, sans-serif;$primaryColor: #333;body { font-family: $fontStack; color: $primaryColor;}//css style//----------------------------------
">
Main Content
div>
div class="span-4 last">
Right Sidebar
div>
div class="span-24 last">
Footer
div>
div>
body>
html>
Span-x indicates that the content spans X meshes, while the right side has a margin of 10 pixels, such as the span-4 width of 4*40-10=150 pixels. Note that when the content crosses the 24th style, the last style needs to be defined, and the last style is set Right-margin to 0. So the above example is clear, the header and footer acros
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.