1, the right title "more" implementation
The effect shown above is used to position to the right side of the H2 label. In this way, the code does take several more lines. In fact, you can use a stupid way to achieve:
For example, the HTML code is as follows:
< h2>< a h ref= "#" > Title </a> < span> more ...</span>
Using Potsition CSS is almost as follows:
h2{
position:relative;
height:20px;
}
span{
Position:absolute;
right:0;
top:0;
Display:block;
height:20px;
}
This can be achieved more on the right side. Actually, it can be simpler:
h2{
height:20px;
}
span{
Float:right;
Display:block;
margin:-10px 0 0 0;
height:20px;
}
In fact, it only uses the negative numbers of the margin-top to achieve, because the default float will wrap to the H2 tag, so let it jump up. The general code is so, is it simple? I said it's easy! Because it's so simple, there's no separate test page.
PS: I said we have to do with a blue ideal editor ...
2, Taobao CSS properties of the sequential writing specifications.
Former colleagues in the department, everyone has a set of writing specifications, resulting in a look at each other's CSS code is very difficult, so the implementation of a written standard, may also help you.
*{
/* Display Properties * *
Display
Position
Float
Clear
Cursor
...
/* Box Model * *
Margin
Padding
Width
Height
* * Typesetting/*
Vertical-align
White-space
Text-decoration
Text-align
...
/* Text * *
Color
Font
Content
/* Border background Why to put boder and background at the end of the reason is that the frequency of changes will be more frequent, put in the final check up convenient, haha. */
Border
Background
}
In the final analysis, the writing sequence of attributes is: Immortal? -How is the figure! -Clothing type (bikini-padded jacket?) – Dress Style (black, white, button, zipper) – What cosmetics and hairstyles are used.
This writing standard is not a small number of browser manufacturers to implement the writing standards, so it may be the majority of standards to promote people do not agree. But these are the brothers several practice come out think most conforms to the existing Taobao environment.