1. Accessing the CSS style of the style property in the elementYou can use the DOM operation to directly access the internal CSS style based on the ID of the property or the name tag, directly using the style object to access2. Accessing externally
Do not know whether the home has encountered such a situation: in the CSS control picture size, if the width of the picture to write dead, such as img{width:500px;}, if the width of the picture is greater than 500px can be very good control it does
Copy the Code code as follows:
List One
List II
List three
We want the implementation of Li to be floating, and centered (the number of Li is not fixed, the UL width is unknown). can set the UL Text-align:center, and
Use as few classes as possible, because you can cascade recognition, such as:. News H3 without having to add classes on H3
3. If no existing elements are differentiated, then use div
Home
About Us
can be
Assuming there are two boxes, we need it at a minimum height of 150PX.
Css
div.box1,div.box2{
width:300px;
min-height:150px;
Background: #EEE;
Float:left;
margin-right:20px;
}
Xhtml
IE does not maintain a minimum height of 150px
The minimum height
I have two examples here, if your browser is IE, you can test it!
1, first look at these lines of code!
Copy CodeThe code is as follows:
Note: I wrote one more
, this label is not closed!Look at the effect, rest assured, this will not die!
is usually a very small value, after a layer of exaggerated distortion, the entire layout is shape. CSS is a very simple language, easy to learn and easy to use, but also the most easily out of the garbage code. This is caused by the lack of
Block IE browser (ie not shown)
Copy CodeThe code is as follows:
*:lang (ZH) select {font:12px!important;}/*ff visible, special statement: Due to the latest opera update, this sentence has now become FF's dedicated hack*/
select:empty
After the specific situation is summarized as: Firefox+table Rowspan+border+border-collapse:collapse;
The performance is: the first line and the last line is normal, the rest of the middle row, all are different from the expected border.
Let's look
by Ahanan 2008-12-4 Welcome to register for a toy member! Confirm Terms of service Select User name select user type Fill in details
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to
They are used to combine a large chunk of HTML code with certain information, most of which are associated with elements using Class attribute class and Identity attribute ID, see CSS Intermediate Guide class and ID selector.
The difference
Old topic: the separation of a classical poem
1. Give you an ancient poem, save it as a bunch of unformatted text, you understand its content, the structure of the processing. After publishing with Word, he has a structure
2. This structure
...
Declared in the GLOBAL.CSS
#myArticle {
width:400px;
height:300px;
}
In this case, directly through the JS getElementById (' myarticle '). Style.width is unable to get the value of 400px, because this value is defined in the CSS, so you
cascading Style sheets:the Definitive Guide
, 2nd Edition is a thorough review of all aspects of CSS2.1 and a comprehensive guide to CSS implementation. The book includes new content on positioning, lists and generated content, table layout, user
Today it took a long time to finally solve the problem, the basic perfect, the only imperfect is IE 6 only after the full download of the picture will automatically adjust the size, but better than nothing, it is more comfortable than to see the
First, let's look at a simple example.
http://www.cssrain.cn
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
There are experts in bi who specifically discuss this layout method, but he used more hack, but also avoided the IE6 DTD. In my actual use, I found that avoiding the DTD definition of IE6 will cause the Ajax modal box to not be centered (a control
How to Use CSS and jQuery to implement a slide navigation menu, jquery navigation menu
In this tutorial, we will show you how to implement a slide navigation menu. Slide navigation menu is a common trend in website design. You can see that many
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