In the design of Web pages, you often encounter the problem: When using a picture background, because the display resolution is too large or the picture size is too small, on either side of the page or the lower part of the background picture. For
caused by the height of the page jitter problem, in fact, the root cause is whether the scroll bar shows, the specific solution is as follows, have a similar situation friends can refer to, I hope to help you
Add the following code in the CSS:
Copy
Center horizontally, if you know the width of an element, you can use the
The code is as follows
. cell{width:300px margin:0 Auto; text-align:center;}
If the inline element is centered, use the text-align:center directly.
If the element width
When making a form, we often encounter a situation where the top and bottom two fields are aligned, such as name, mobile number, birthplace. So we're going to use text-align, text-justify style.Text-align directly set as justify on the line,
Most of the menu on the site is implemented by CSS, whether it is driven by the effect of the painting, or without animation effect, whether it is a level menu or multi-level menu, whether it is a horizontal menu, and whether vertical menu, almost
CSS there are bugs, but how can we remember these bugs, so that in the future to write CSS code can be a good response, this is not, the conscientious to write such a CSS bug jingle, or very good:
One, ie border if no, should pay attention to, must
Sometimes, in order to avoid the page of a div content too much, and cause page distortion, we usually define Overflow:hidden in CSS, so that will not display text, but it seems that the user experience is not very good, in order to get the best
In the use of CSS process will inevitably encounter some common bugs and browser compatibility aspects of processing, below share with you the common CSS 11 skills and experience, like the Web front-end friends can refer to, I hope to help you
1.
Using abbreviations can help reduce the size of your CSS files and make it easier to read. The main rules for CSS abbreviations are as follows:
Color
16 The color value of the binary, if the value of each two digits is the same, you can abbreviate
Banner in the Web page of the concept must have some understanding of it, the following article through the HTML div+css simple implementation, like friends can refer to the next OH
HTML div+css Making Banner
Copy Code code as follows:
Using CSS abbreviations can reduce the paging file size, improve download speed, and make the code concise and readable.
Such as:
div{
border-top:1px solid #cccccc;
border-left:1px solid #cccccc;
border-right:1px soli #cccccc;
"Reconstruction" of the spring wind blowing across the river North and south, the internet for a time jittery, "div+css" has become a "fashion", difficult to all of the sites have invariably started their own "refactoring." But it's often laughing
CSS Div Mask layer must be familiar with the Web page friends are not unfamiliar with it, the Internet has related to the implementation of the article, but most of the compatibility of the browser is not good, in this article will introduce you to
This article mainly introduces Dom + CSS for the basic tutorial, the need for friends can refer to the following
1. Use getElementsByTagName to modify class categories or append categories
The code is as follows: First First First First
Designing and developing a website can be tiring sometimes because all the little things need to be taken into account, including all the tweaks and minor changes that can happen at any time, and so on.
So designers and developers are constantly
This article mainly introduces the dynamic loading of JS, CSS and other documents across the implementation of the method of IFRAME, the need for friends can refer to the following 1. Dynamically loading Js,css files (with native JS and jquery)
We talked about the ID selector and class selector, and their differences and relationships, and let's explore the magical categories and pseudo-elements.
In fact, I used to pseudo-class and pseudo-elements are also confused, and now decided to
The following sharing is my recent days after learning the margin knowledge, a great inspiration, feel the previous understanding of margin is simply too shallow. So write the following articles, one for their own ideas, and the other is to share
In order to achieve a unified page effect, you need to write a specific CSS style for different browsers or different versions, we put this to different browsers/different versions of the corresponding CSS code process, called CSS hack! for many
In web design, the use of position attributes is very important. Sometimes it will bring us many unexpected difficulties if we do not know this property clearly.
There are four different positioning methods for position properties, namely static,
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