If you use annotations properly, adding annotations to your CSS files can be a great help to you and others during the development process. The most common is to add hints to CSS style rules, but using annotations is also helpful for optimizing your
The swelling of the head, can not see things do not matter, then write a essay bar.The picture is centered vertically, the principle should be, in fact, I do not know.Two methods on hand, similar to each other, but are compatible with IE6.
Copy
The top of IMG and input on the page is always aligned, the preview is as follows:
The solution is actually very simple, we just add vertical-align:middle attributes to the picture.
The code is as follows
"
CSS prevents image size from being too large
Add the following CSS:
The code is as follows
IMG {max-width:800px;Height:auto;}
The max-width:800px in code limits the maximum width of the picture to 800 pixels,
hand Hand type crosshair Cross text text wait waiting help question mark e-resize right arrow ne-resize arrow on the right n-resize nw-resize arrow on the left w-resize left arrow sw-resize left arrow s-resize under the arrows
Display:block is a block of objects
Display:noneis not displayed
QU1: I often see there is to do a layer, and then write something in it, and then give it a property display:none, so that this thing is not visible on the page, but why build a
The -9999 px Image substitution technology has been popular for one of the best parts of the decade. Replace a text element and an image, you can use the following code:this Text is replacedThe background of the element is displayed and its text is
First, Code simplification
Using the DIV+CSS layout makes the code very concise, this is believed that the method is well known to all the friends know, CSS files can be used in every Web page, as long as the call can be used to modify some pages
1, the CSS Control div can not center the most easily committed also the simplest is not to write a DTD statement, does not conform to the rules of the web, this is easy to solve, at the top of the page plus:
That's it! In fact, there are a lot of
As shown in the picture effect:
First look at the XHTML code:
item one subitem one subitem two subitem" three subitem four item two item three item four
See how CSS is fixed for a long time related elements:
one, inline style (Inline style)
That is, use the Style property to write the CSS directly in the HTML tag.
For example: This line of paragraph will appear in red.
Note : The Style property can be used on all (X) HTML
So a little research, under this record:
Of course, to achieve transparency, many generally use three ways:
1, direct use of transparent pictures, this is really more direct, but often need to make pictures, personally think, maintainability is
CSS resolves the effect of overriding the transparency of the parent element
CSS-compatible browser transparency notation1.{opacity:0.3;filter:alpha (opacity=30);}CSS is not compatible with coverage transparencyIf the parent element has
Graduation design To do a tip box: When the mouse is placed on a link, the bottom of the display has a prompt function of the form. are as follows:
The specific code implementation is as follows:Css:
The Code is as follows: . rhsyyhqdiv{ Position:
text side with the picture, found that the picture than the text, the original default is the picture top alignment and text bottom alignment, by setting CSS properties can make the picture and text alignment.
Set the Vertical-align property for
Right alignment with CSS, which seems like a very basic example, but the more basic the more error, sometimes can not even find a clue, this is my own in the beginning to write CSS when the problems encountered, today to CSS beginners to demonstrate
For a front-end designer, often using CSS design pages, for clear floating seems to be a more basic skill, but there are many ways and code to clear the float, today to share a popular and many large projects have been adopted in the CSS clear
CSS does not have an argument on the layout of the text that is aligned to the bottom of the container. A good way to use it is also better. is to use the Position property to solve, look at the following code, with the position of the relative and
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service