/* Dynamically add JS or Css,url: File path, FileType: File type (JS/CSS) */
function Addjsfiles (url,filetype) {
var ohead = document.getElementsByTagName (' head '). Item (0);
var addheadfile;
if (filetype== "JS") {
addheadfile= document.
Step-by-Step learning to make navigation bar, the end of the article to do a comprehensive page, to share to everyone a cool navigation bar for everyone's reference, the specific contents are as follows
1. The navigation bar highlighted on the
JS and CSS are different in IE and Firefox (FF)
CSS:
1.
The UL tag in FF has a padding value, but there is no margin value, and in IE is the opposite
Solution: The UL padding and margin are set to 0 (also can not 0) such as:
Class attribute Modification
Class attributes, which are class attributes, specify the name of the classes.When specifying a style with a class selector, you need to specify the class name, which is the value of the class attribute, for the element.
I have added CSS restrictions:
Copy Code code as follows:
div img {} {
max-width:600px;
width:600px;
Width:expression (document.body.clientwidth>600?) 600px ":" Auto ");
Overflow:hidden;
}
max-width:600px; In IE7, FF
This article illustrates the method of js+css to realize navigation effect. Share to everyone for your reference. The implementation methods are as follows:
1. The program code is as follows:
Copy Code code as follows:
The Position property sets the positioning type of the element. This property defines the positioning mechanism used to establish the element layout. Any element can be positioned, but an absolute or fixed element generates a block-level box
Note: √ attribute inheritance x does not inherit
[] to accommodate element types none [] marked as all elements
Font
√font-family
√font-size 9 Xx-small X-small Small Medium large x-large xx-large smaller larger
√color
√font-style Normal Italic
Although for today's bandwidth, the size of a Web page file is only a small amount of k, but how to reduce this to the k to calculate the minimum page file is one of the issues that web designers should consider.
All week, without affecting the
At present, we want to use the fillet effect in the Web page, always by cutting the graph and then nesting a lot of Div, with the background to achieve rounded corners effect. For the front-end development engineers, rounded corner is really a love
Triangle
When writing CSS, used the background map, ignoring the CSS itself can actually achieve a lot of simple basic graphics, such as triangles:
. triangle { border-style:solid; border-width:20px; Border-color: #000 transparent
CSS controls the height of the HTML page to cause jitter, which is caused by the height of the page jitter problem, in fact, the root cause is the scroll bar display is caused by
Add the following code to the CSS:
Media queries are used in responsive web pages.
1. Initialize the settings:
In the HTML file, insert a word in the top tag of the page:
The phrase is to make an initialization setting for the responsive Web page, which mainly includes:
Name=
CSS Common Properties *********
"Font"
Font Sets or retrieves the text attributes in an object. This property is a composite property.
The first method of declaring parameters must be in the same order as above, and font-size and font-family
CSS Common Properties *********
"Margin"
Margin retrieves or sets the epitaxial margins of four edges of an object
Margin-top retrieves or sets the epitaxial margins of the top edge of an object
Margin-right retrieves or sets the extended
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