CSS note-in addition to the tag, the content of the hover attribute is brief: The following may be very simple for most netizens, but I do not know it. There is a piece of HTML like this: div a href = # IMG alt = I am an IMG src1_img.jpg // A/Div.
DragProgramPrinciple: Move the dragged element based on the movement of the mouse. The movement of the mouse is the change of the X and Y coordinates. The movement of the element is the change of the top and left of the style. position. First, you
Position Positioning method. The root container uses relative and the others use absolute.
Percentage recommended for width and height
Percentage recommended for top, left, bottom, and right Positioning
We recommend using pixels
CSS is so popular,Yes, it has the following advantages:
1. complies with W3C standards. Ensure that the website will not be eliminated due to the upgrade of network applications in the future.2. Support for backward compatibility of browsers,
Before I made the UI, I needed to use transparency. So Baidu found some methods to achieve the effect and did not go into details, however, during the last few days of the UI, we found that the opacity of the sub-nodes in the transparent layer is
Less than IE6
* HTML {}
Less than IE 7*: First-Child + HTML {} * HTML {}
Only for IE 7*: First-Child + HTML {}
Only for IE 7 and modern browsersHTML> body {}
Only for modern browsers (not IE 7)HTML>/**/body {}
Latest versions of opera 9 or
Document directory
External style sheet
Internal style sheet
Inline Style
See w3school/CSSCSS Overview
CSS refers to the stacked style sheet (CAscadingSTyleSHeets)
Style DefinitionHow to displayHTML Element
Styles are usually stored
Recently changed a company
I found that my colleagues in the new company often write the CSS styles that need to be dynamically generated in JS when working on backend Ajax with JSON, which makes it very difficult to interpret the code.
So I talked
CSS syntax
CSS syntax consists of three parts: selector, attribute, and value:
selector {property: value}
Body {color: blue}
1. derived Selector
You can define a style based on the context of the element in its position to make the tag more concise.
1. High Resolution
IE: the actual height will be used when the content exceeds the height even if the height is defined based on the height change of the content, including the undefined height of the image content.
Firefox: when no height is
The CSDN Blog has been launched for a while. I believe everyone has their own Blog. Today, I saw a beautiful Blog. I learned from it. The results are not exclusive. I chose two beautiful ones for your reference.
// Customize the CSS selector for The
Common CSS layout methods:Float: none | left | right
Valid value:None: default value. Objects are not floatLeft: Right of the text flow objectRight: Left side of the text flow object
How does it work? Let's look at an example of one row and two
In Appcan development, the first thing to do is the page layout, and then fill in the data on the page, and add the interactive elements to form a complete application.
Because appcan is developed using HTML5 + CSS3 + JavaScript technology, it is
1css controls truncated text overflow:
. Block {display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: Left ;}
Automatic line feed
dd{white-space:normal; word-break:break-all;}
Force do not
DIV + CSS achieves fixed width on both sides and adaptive width in the middle-tianmei design blog I am the header I am from the left, width: 200px I am the right, width: 200px I am the middle, wide adaptive I am the bottom
1. css simplified font rules
When CSS is used to define the font, you may do the following:Font-size: 1em;Line-Height: 1.5em;Font-weight: bold;Font-style: italic;Font-variant: Small-caps;Font-family: verdana, Serif;In fact, you can abbreviated these
This article
Reprinted from
Www.admin5.com
CSS (Cascading Style Sheets)
Introduction
Learning
CSS
BeforeBefore learning CSS, you should first learn to write HTML. If you do not know anything about HTML, see the HTML tutorial.
CSS (Cascading Style
#: There are two types of browsers: ie (which does not comply with w3c standards) and non-ie (which complies with w3c standards). However, the ie series is approaching w3c standards.
1. body margin: 0px can make the surrounding seamless;
2. Define
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