Learn some fine-grained summaries of HTML and CSS in the near period

Source: Internet
Author: User


1, Border Fillet property: Border-radius, the value can be a percentage/custom length, can not take negative values. If it is a circle, set the height and width equal, and set Border-radius to 100%
2, ie6,ie7,ie8,opera,firfox-2.0 and other browsers, does not support the border fillet effect. We can do it with pictures.
3, in order to overcome some of the browser can not display the effect of certain property settings, can be specifically set to make it recognized, such as Firefox browser is-moz-, Google Browser is-webkit-, applications such as:-webkit-border-radius:100%;
4. Attribute elements such as input can be set in the style as follows (text can be anything else):
Input[type= "Text"]{
width:50px;
...... (Other property settings)
}
5. You can use Outline:none; Remove the border of input entry form. But sometimes even if you set the Outline:none, you will find that the border is not removed, this time can be used Border:none, you can solve the problem.
6, sometimes can use the unordered list Ul,li to implement some elements in the same row, because the list is a block-level element, this time we can use the floating element to make each column of the list item into an inline element, realizing that they appear on the same line.
7, sometimes we use input to do the search box, often in the search box set the initial value, and then the user click on the initial value will disappear, in addition to using JavaScript events, but also with the placeholder property to do. such as <input id= "search" name= "search" placeholder= "Please input what do you want ..."/>
8, use input to do some input boxes, such as Password box, user name, etc., should be set the maximum length of input, to avoid the occurrence of unrestricted input.
9. The inline element cannot set its height and width, but it can set its padding and left and right margins.
10, the method of automatic line wrapping (forcing line wrapping) is to add Word-break:break-all to the declaration block;
The best reference fragment is Word-wrap:break-word;overflow:hidden;
Other fragments that can be referenced are word-wrap:break-word;overflow:auto;
ALSO: Word-wrap:break-word;word-break:break-all;
11, sometimes we want to put a thing we do in the center of the entire page, we can set the margin value to achieve. Set the Margin:0px;margin:auto;
12, generally if you do not want content shelf or next to the edge of the Div, you can set the Padding property, but remember to change the original setting width and height, to ensure the original size. The principle is that the content area of an element is the portion defined by width and height, but the background color and image of the element can be displayed in padding.
13, in order to prevent the element content of the floating element previously set affects the contents of the later set, you can set the cancellation floating clear:left/right within the declaration block of the subsequent element. It then sets the float of the latter element itself.

Learn some fine-grained summaries of HTML and CSS in the near period

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.