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