HTML implementation Rounded Rectangle

Source: Internet
Author: User

Question: How do I use div+css and positioning to achieve rounded rectangles?

Workaround Overview:

Content: First in the <body> tag inside add a large layer (large layer to fix the overall large frame), and then the large layer contains four small layers (four small layers of four fillets respectively (pre-oval shape with PS, and then cut with a slicing tool))

Style: CSS properties to be set inside the

1.position:relative;

2. Width and height;

3 background color;

4. Border line (used to adjust the relative position of four original angle, adjust the border line settings can be deleted)

When setting up a small layer of CSS, the attributes that are required in each layer are:

1.position:absolute;

2. Width and height;

3. Directional properties (left,right,bottom,top)

4.background:url ("") no-repeat; (rounded pictures in all directions)

Here is the code for my rounded rectangle:

<!doctype html>

Note: The CSS style used in my code is inline, with three types of CSS styles: inline, inline, external.

HTML implementation Rounded Rectangle

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.