CSS3 User Interface

Source: Internet
Author: User

In CSS3, a number of new user interface features have been added to adjust element size, box size, and outer border.

You will learn about the following user interface properties:

    • Resize
    • Box-sizing
    • Outline-offset

CSS3 Adjust the size:

CSS3, the Resize property specifies whether an element should be resized by the user.

This div element is resized by the user

The CSS code is as follows:

<style> Div {    border:2px solid;     padding:10px 40px;      width:300px;     Resize:both;     overflow:auto;} </style>

CSS3 Box Size adjustment:

The Box-sizing property allows you to define exactly what is appropriate for a particular area.

Div.box {    box-sizing:border-box;     width:50%;     Border:1em solid red;     float:left;} </style>

CSS3 Shape Modification:

The Outline-offset property offsets the outline and draws the outline at a position beyond the edge of the border.

The outline differs from the border by two points:

    • Contour does not occupy space
    • The profile may be non-rectangular

Outlines 15 pixels outside the edge of the bounding rectangle:

<style> Div {    margin:20px;     width:150px;      padding:10px;     height:70px;     Border:2px solid black;     outline:2px solid red;     outline-offset:15px;} </style>

CSS3 User Interface

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.