Method 1:
Document. getElementById ("elementId"). style. background = "# ff0000 ";
In this way, inline is used to insert css. The priority is high. This vulnerability may cause poor page reflux performance and cannot be added to multiple
Four principles of css priority:Principle 1: it is better to specify inheritanceIf a style is inherited, it is never higher than the specified priority.Example 1:CODE: How large is the font size? Running result:. class3 {font-size: 12px ;}Example
The class and ID names in CSS can be customized, and they do not retain keywords like some programming languages. They can be completely named in CSS. But to make CSS more readable, many people advocate standard naming. Speaking of this, I found
The help house (www.bkjia.com) Tutorial achieves form submission and output effects on the same page. This function is implemented using Javascript and can be widely used for confirmation during form submission. If you like it, just add it to your
1. configurable CSS attributes include: font attributes, text attributes, color and background attributes, border attributes, container attributes (margin attributes, fill attributes), category attributes, and mouse attributes.Ii. Basic
As the main language for making web pages today, css has become a must-have for every Webmaster. If you still don't know css, you are still using dw to create a table Page, your website may not be able to get effective seo and other performance
The modularization of the Helper House (www.bkjia.com) course refers to the process of dividing the software system into several modules from top to bottom when solving a complex problem. Each module completes a specific sub-function. All modules
Helper House (Bkjia.com) TutorialHow to make the layer perpendicular to the browser, here we use the absolute percentage Positioning method, and the external patch negative value method, the negative value of its own width and height divided by
Creating a webpage with HTML is like drawing a picture with a paint brush. Only those who are obsessed with creating web pages may precisely implement the expected results. This is not the right tool and flexibility.
Anyone who has used HTML for
CSS line-by-line color change is actually very simple. You can use any of the following methods based on your needs. Of course, it should be suitable for your coding and requirements:I. background imageIf the row height is fixed, we recommend that
CSS layout, as a hot technology, is indeed somewhat slow.CSS was first proposed in 1994 and first supported by browsers in 1996. CSS has been regarded as the successor of traditional HTML-based web code.CSS uses a style sheet to control the font and
Purpose: Obtain the attribute value of a specific style declared in the CSS file. For example:
Declare in global.css
# MyArticle {width: 400px; height: 300px ;}
In this case, getElementById ('myarticle') is directly implemented through JS '). style.
LieHuo36.Net teaches 65 steps to use CSS to create A beautiful button link. The principle is to use the Hover attribute of the link and define it as: hover has different colors and borders, so that when you place the mouse, there will be a great
In the DOM, form resetting is very simple. Just use or . Native DOM also provides the reset () method for form resetting.However, in Firefox/Chrome, if the field is a hidden field (type = "hidden"), you cannot use reset to restore the field value
CSS3 is a good thing, but it is also easily confused by her transform and animation (many of which vary with browser vendors) features, forget the most basic selectors that have been added to the Standard Specification. Many powerful new
Too many images in the page can delay the loading of images, greatly improving the page loading speed and user availability.1. Some pages are too long or too wide. You can consider loading only images near the display area.2. The image is not
IE8 considers that all table cells have the colfont attribute. Therefore, it is tricky to set a style for cells with colfont attributes.
Td [colfont], th [colfont] {/* Note: no matter whether the cell has the colfont attribute, in IE8, this style
Css controls the image size, adaptive scaling, and is compatible with IE6 and Firefox. For example, we always encounter such problems in Daily website design, and the image size is unknown, the width of the content area of the website we designed is
This is because when you move the mouse over a in td, The onmouseout event of td will be triggered.Then, onmouseover of a is triggered, and the event transfer chain is sent up to td.Onmouseover is triggered again, so it will flash.There are two
IE6 position: fixed bug 11111111111111111 If the effect cannot be displayed, press Ctrl + F5 to refresh the page. For more webpage code: http://www.bkjia.com/
Tip: the code can be modified before running!
The above code is
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