The recent written test often encountered this problem, usually write code seems very little thinking about this, I would like to make a small summary for the interview needs.
There are still a lot of questions about the vertical layout of elements,
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,
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
Let's look at the question first:
View Style:
The Background-size property is overwritten, and viewing the style properties does not reveal any redefinition in the selected state.
When the background-size is added directly, it takes
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
The percentage of margin,padding is calculated relative to the width of the nearest parent container.
Percent
child
The main reason for guessing:
1, in order to unify the ratio, if the width and height of the same
Prerequisite Summary:
A Web site or channel page, the content of more pictures, and changes are not too frequent, how to optimize to become a difficult problem, the use of CSS Sprite function can be implemented to merge multiple pictures together
The first line height is the character size of the text and the margin of the character up and down, the key is that the upper and lower margins are equal, you can think of row height is two invisible horizontal parallel, and in parallel, characters
Web page code:
css layout: Upper and lower three columns adaptive height CSS layout this is the top ;/div> page Header and foot
Er height is fixed, the middle content Height Adaptive browser window height code, with the size of
Static
This is the default positioning method for the element, which appears in the normal document stream and takes up page space. You cannot use Top,bottom,left,right and Z-index. Relative
Relative positioning, relative to its parent element
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, floating positioning
1, positioning
To put it simply, positioning is the default location for changing elements on the page.
2, positioning of the classification
According to the results of positioning, you can be divided into the following
If we're going to put the hot picture in the position below, how do we do that?
Let's start with a layout, with a div that includes a tag and an IMG tag, and a style for a tag, the following code:
document
Home
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
Basic Knowledge
Html
1.text-align Baidu Encyclopedia
2. Writing HTML code requires indentation. Various text editors do not seem to have the function of carriage return indentation.
Indentation looks clear, not indented to write simple.With the
First: The difference between the Px,em,rem.
PX is an absolute font sizeEM is the relative font size calculated based on the cardinality (for example: 1.5em). This cardinality is multiplied by the current object from its parent to the genetic font
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