The CSS specification allows you to create styles using abbreviated syntax, called shorthand CSS. Shorthand CSS allows you to specify the values of multiple properties with one property tag. For example, you can use the Font property to set the Font-style, Font-variant, Font-weight, Font-size, Line-height, and font-family properties in one line of syntax.
A key issue to note when using
The shorthand for JavaScript developers
This article is based on years of JavaScript coding experience and is suitable for all developers who are using JavaScript programming.
The purpose of this article is to help you more skillfully use the JavaScript language for development.
The article will be divided into two parts: the preliminary article and the advanced article.
Preliminary Article 1. Three-object Operators
The following is a good example.
Part 1 Font ShorthandThe naming rules for CSS are named in English alphanumeric and underscore (usually lowercase). The advantages of shorthand CSS font are three: one is easy to write (like a keyboard shortcut), the other is to simplify the code, and the third is to help you familiarize yourself with and understand CSS.First, the font properties mainly include the followingFont-family,font-style,font-variant,font-weight,font-size,fontfont-family(font
recently started to study the shorthand method for JavaScript, and here's a short method for judging null Recently I found myself writing JavaScript code is bloated, so I began to study the shorthand method of JavaScript. This will make our JavaScript code look refreshing and also improve our technology. So what's the shorthand for a null judgment??nbsp; The fo
CSS abbreviationMultiple rows of CSS attributes are declared as one row, also knownCSSCode optimization. The biggest benefit of CSS shorthand is that it can significantly reduce the size of CSS files. In fact, there are many other benefits. A bloated and messy CSS style sheet makes debugging difficult. Especially when a team is designing, your bloated CSS code will reduce the efficiency of other members of your team.
Today, storm has compiled some CSS
Shorthand Argument NamesSwift automatically provides shorthand argument names to inline closures, which can is used to refer to the values of the Closure ' s arguments by the names,, $0 $1 $2 , and so on.If You use these shorthand argument names within your closure expression, you can omit the closure ' s argument list from it s definition, and the number and typ
CSS Shorthand refers to the shorthand of multiple lines of CSS properties, also known as CSS code optimization or CSS abbreviations . The biggest benefit of CSS shorthand is the ability to significantly reduce the size of CSS files, optimize the overall performance of the site, easier to read.The following are common CSS shor
In Jni, when we use Getfieldid/getstaticfieldid or Getmethodid/getstaticmethodid and define Jninativemethod, we need to represent the type of the member variable, Or a function to pass in a parameter or return type. JNI represents the type of field, or the type of a function passed in a parameter or return value, in the form of char*. for member variables, the type of the member variable can be represented directly by a shorthand of the Java type For
Original: http://www.jb51.net/article/47234.htmThe recent discovery of the JavaScript code that I wrote was rather bloated, so I began to study the shorthand method of JavaScript. This way, we can make our JavaScript code look fresh and improve our technology. So how do you abbreviate the judgment?The following is a shorthand method for judging null.The code is as follows: ifnullundefined‘‘) { var variab
CSS shorthand refers to the shorthand of multiple lines of CSS properties, also known as CSS Code optimization or CSS abbreviations. CssThe biggest benefit of shorthand is the ability to significantly reduce the size of CSS files, optimize the overall performance of the site, more easily readRead.The following are common CSS
1. Create a new 400*600 file.
--The NIB--
2. Use the pen to check out the outside shape of the pen, according to Ctrl+enter into the selection, with RGB (120,116,138) for filling.
Figures 1, 2, 3
No.1
No.2
No.3
3. Then use the pen to sketch out the Middle Hollow section (be sure to save the path), press Ctrl+enter into the
Order:
Font-size Line-height font-family
{ font-size: 12px} { font:}
Where Line-height is a Text property , but it can also be used as a complement to the Font-size value , separated by a slash (/) . 200%/1.2
When you use the shorthand property font , all ignored values are reset to the default values.
{ font:}{ font:}{ font-size: 150%}
Results
Why H2 no italic effect?
Because the value ignored by
CSS shorthand refers to the shorthand of multiple lines of CSS properties, also known as CSS Code optimization or CSS abbreviations.The biggest benefit of CSS shorthand is the ability to significantly reduce the size of CSS files, optimize the overall performance of the site, easier to read.The following are common CSS shorth
= ' red ';
Car.wheels = 4;
Car.hubcaps = ' spinning ';
Car.age = 4;
The following writing can achieve the same effect:
var car = {
colour: ' Red ',
wheels:4,
hubcaps: ' Spinning ',
age:4
}
This is much simpler, and you don't have to use the name of the object over and over again.So the car is defined, maybe you will encounter invaliduserinsession problems, which only you will encounter when using IE, as long as you remember, do not write a semicolon in front of the rig
This article comes from years of experience in JavaScript coding techniques that are suitable for all developers who are programming with JavaScript.The purpose of this article is to help you become more proficient in the use of JavaScript language for development work.This article will be divided into two parts: primary and Advanced, respectively.Beginner's article1, trinocular operatorThe following is a good example of a complete if statement, abbreviated to a single line of code.const x = 20;
HTML5 Meta CharSet page character encoding shorthandHTML5 Meta CharSet page character encoding shorthand abbreviation tutorial (Music relaxation Chair)In addition to the DOCTYPE HTML can be shortened in HTML5, and this abbreviation compatible with the new old version and different brand browser, meta-CharSet Web page encoding can be abbreviated, but also compatible with the old version of the browser and browser and different brands.Related Tutorials
Box model shorthand:
If the values for top, right, bottom, and left are the same, such as the following code: margin:10px 10px 10px 10px; Abbreviated as: margin:10px;
If top and bottom values are the same, left and right values are the same. margin:10px 20px 10px 20px; abbreviated as: margin:10px 20px;
If the value of left and right is the same. margin:10px 20px 30px 20px; abbreviation: margin:10px 20px 30px;
Colo
Some CSS shorthand tipsThe abbreviated font for 1.font has optional options and required options such as Font-style, Font-weight, Font-variant, can be written without writing, but must be placed before Font-size and font-family if written. And the required font-family must be put on the last side.p{font-style:italic; font-weight:bold; font-variant:small-caps; font-size:12px; font-family:arial; } can be abbreviated into p{font:italic bold small-caps
Often in the code of the cattle everywhere see many shorthand conditional expression statements, read some articles about this, feel 3 ways 2 s ay iF This article (http://www.thomasfrank.se/3_ways_2_say_if.html) is not bad. In this article, the author of the traditional If...else ...,?:, /| | The characteristics and usefulness of three kinds of conditional expressions are summarized and summarized as follows:
1. If...else structure
Set
:\Documents and Settings\ Current user name \local Settings\Temp
%ProgramFiles% C:\Program Files
%commonprogramfiles% C:\Program Files\Common Files
Docum~1 Documents and Settings
Progra~1 program Files
The disk partition on which the%systemdrive%:windows system resides, usually the root of the C disk
The directory where the%systemroot%,%windir%:windows system is located, usually the C:\Winows
%programfiles%: Normally it's C:\program files.
%commonprogramfiles%: Common file directory, usually C:\
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.