For a long time did not study CSS, all day with a variety of frameworks do not need to write their own, and recently to do a photo album page, encountered the first problem is how to arrange.
Give the design draft first and then say how the style
You may often use hover this attribute, with hover to achieve the color change of the mouse and so on, in fact, hover is very powerful.
Share a mouse through, pop-up drop-down menu tips;
When we built a list:
Level menu Level menu Level two
JavaScript has a Preventdefault method that cancels the default action for an event since it is available. For example, cancel open the link, select text or drag and drop.
Event.preventdefault ()This method notifies the Web browser not to perform
The first point is consistent with mine, but I changed it to position: absolute, and the problem still exists. The second and third points do not match my situation.The next step is layer-by-layer Tracing. We find that we can add "position: relative;
You can define a style based on the context of the element in its position to make the tag more concise. In CSS1, the selectors that apply rules are called contextual selectors because they depend on context relationships to apply or avoid a rule.
Taobao web pages use import, while many websites use link. Of course, some websites with relatively simple pages and high traffic directly write CSS in html code? What are their differences? Is it better to use import or link for css? I learned
I. INTRODUCTION to condition comments1. Conditional comments in IE is a common hack method in WEB design, which can distinguish IE versions from non-IE versions.2. Condition annotations can only be used for IE5.3. If you have installed multiple IE,
The methods for FF, OPERA, SAFARI, IE7, and IE8 are as follows: The code is as follows:Copy code Img {max-width: 100px; max-height: 100px ;}Img {min-width: 100px; min-height: 100px ;} IE6 and earlier versions use the expression attributes
Vertical-align definitionAt first, I thought that vertical-align, like text-align, is the center alignment of non-block elements inside the container, ~~ I got it wrong.From the w3c official explanation of vertical-align attributes, vertical-align
Let's take a look at the effect picture.This is our common tips tip effect, exquisite and nice-looking. The code is as follows:Copy code implementation of small and medium-sized triangles in Tip! small and medium triangles in Tip! &
The code is as follows:Copy code Table {Table-layout: fixed;}Td {White-space: nowrap;Overflow: hidden;Text-overflow: ellipsis;} Resolution: 1. table-layout: fixed because the default value of table-layout is auto, that is, the width and height
Let's first look at a style. What if we set the element border:TestIt seems that I can't see anything. Let me add different colors to the four borders. Let's take a look:TestDid you find something? Right. Let's remove the text in the middle: In this
1. The div tag is not closed.This is one of the most common causes of layout design failure. We are always surprised when we learn how many exquisite Forum designs are ineffective. Opening div labels is one of the most common design mistakes and one
I. How to set text font, color, and size-use fontFont-style: set italic, for example, font-style: italic;Font-weight: specifies the text width, for example, font-weight: bold;Font-size: set the text size, for example, font-size: 12px; (or 9pt, refer
There are many methods to control div definition using css. Let's take a look at the instance code of different methods. The code is as follows:Copy code Satan Well, there are four methods, but they all share the same meaning,
In this article, the css text-and-text mixed layout style code is very helpful for beginners. Let's take a look at what styles are arranged first.That's the effect. Now let's take a look at his css code. The code is as follows:Copy code
The following code uses css to implement a webpage background gradient:1. Gradient from top to bottomBody {FILTER: progid: DXImageTransform. Microsoft. Gradient (gradientType = 0, startColorStr = # ffffff, endColorStr = #000000 );}2. Gradient from
I. Use CSS abbreviationsUsing abbreviations can help reduce the size of your CSS file and make it easier to read. For the main rules of css abbreviations, see common css abbreviations syntax summary, which is not described here.II. Define the unit
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