Here for an example of getting the HTML element width high
JS has two ways to get the width of HTML elements: 1.obj.style.width;2.getcomputedstyle and Currentstyle (IE) functions
However, in practice, it is found that the first method is unable to
HTML code:
div01
nei1
nei2
nei3
nei4
nei5
nei6
nei7
nei8
nei9
nei10
nei11
nei12
nei13
nei14
xuhaitaoxuhaitaoxuhaitaoxuhaitaoxuhaitaoxuhaitaoxuhaitao
If the CSS settings are as follows:
Did a cat factory very classic front-end pen test questions, solved the two columns have been on the understanding of the layout of too few problems.
The title requirement is right aside fixed width 200px, left content adaptive.
Originally directly
Method One
content
. Table {display:table;}
. Table-cell {Display:table-cell; vertical-align:middle;}
Advantages : Content can dynamically change the height, if you do not need to support IE7 browser, this should be the preferred
In CSS to call the JS program. This technology is in the network security, called the CSS Cross station.We know that CSS can control the attributes of some HTML elements, such as background-image, and so on, and in the URL to add Javascript:alert ()
In CSS, we generally use border to set the HTML element border, but can also use the background background to simulate the CSS border effect, this article to introduce you to CSS using background background to achieve border border effect, the need
One, left and right sides, fixed width of 200px on the left-hand side, adaptive occupied full
HTML code
CSS Code
*{
margin:0px;
padding:0px
}
. divbox{
height:500px;
Background:yellow
}
. left{
Float:left;
The body of the DOM rendering depends on the head of the external JS loaded.
Based on this principle, the recommendations are as follows:
1, head in the presence of JS, in any case, CSS files can not and the body of the request in parallel.
2,
often we see a picture with the right side of this layout with a passage: The following figure:
This can be done through CSS styles, all of which are shown below:
fjkdjfkdejfioef
fjkdjfeifj
kjfkdjfdjf
fjkdjfiejf
This article introduces the CSS picture to the code agriculture to darken the color and lighten
The instance code is as follows:
You can refer to CSS3 opacity properties
Original address: http://www.manongjc.com/article/837.html
Today, I used the Onmouse event to find some content on the Internet.
General Event Event Browser support descriptionOnClick ie3| n2| O3 Mouse click events, multiple mouse clicks within a controlled range of an objectOnDblClick ie4| n4
CSS has three major characteristics, is the inheritance, cascade, priority, here to explain the inheritance of
Inheritance means that a label that is wrapped inside will have the style of an external label, that is, child elements can inherit the
statement: The original source from the blog park, I am only a porter
Last year began to contact with HTML/CSS, in the process of coding feel a lot of HTML tags are really waste, and also a lot of CSS properties, so I think there is no better than
The box
model concept box model used to "put" a variety of elements in the Web page design content, such as text, pictures and other elements, are boxes (div nested)
two. Box Model Properties
Width High Property
Border properties
HTML> HTMLlang="en"> Head> Metacharset="UTF-8"> style>P{/* Front is the font family name the last one is the family name browser in the display font, in turn to determine whether to support the current font, know the last font series * *font-family:
title . bgcolor{ Background:url ("Images/image.jpg") no-repeat top #999;} Top is for the picture, of course, you can also change to left, right or bottom
Background images and background colors can coexist.
{background: #000 URL (img/img.jpg)
1, some fonts some computers are unable to display, but the Arial and blackbody can be displayed.
2, Figure 1
3, Figure 2, p is the child element of Div, if p and color attributes and div is the same words can write: style= "Color:inherit", this
Some web pages have a messy CSS file format, written in 1 lines, such as:
To this end, we wrote a python3 script, the term format CSS file, the effect of formatting as shown:
#!usr/bin/env python
#-*-coding:utf-8 _*-
"" "
@project: Normal_css
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