Leakbali
w3 Tutorial, Web Tutorial
Switch to English Bahasa Indonesia 
Register   Login

CSS3 - User Interface


In CSS3, some of the new user interface features are resizing elements, box sizing, and outlining.

In this chapter you will learn about the following user interface properties:
  • resize
  • box-sizing
  • outline-offset

CSS3 User Interface Browser Support

Property Browser Support
resize
box-sizing
outline-offset
The resize property is only supported in Chrome and Safari.

The box-sizing is supported in Internet Explorer and Opera. Firefox requires the prefix -moz-. Chrome and Safari require the prefix -webkit-.

The outline property is supported in all major browsers, except Internet Explorer.
In CSS3, the resize property specifies whether or not an element should be resizable by the user.
This div element is resizable by the user (in Google Chrome and Safari).


The CSS code is as follows:

CSS3 Resizing Example

Specify that a div element should be resizable by the user:
div
{
resize:both;
overflow:auto;
}
This div occupies the left half.
This div occupies the right half.
The box-sizing property allows you to define certain elements to fit an area in a certain way:

CSS3 Box Sizing Example

Specify two bordered boxes side by side:
div
{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
-webkit-box-sizing:border-box; /* Safari and Chrome */
width:50%;
float:left;
}
This div has an outline 15px outside the border edge.
The outline-offset property offsets an outline, and draws it beyond the border edge.

Outlines differ from borders in two ways:
  • Outlines do not take up space
  • Outlines may be non-rectangular


CSS3 Outline Offset Example

Specify an outline 15px outside the border edge:
div
{
border:2px solid black;
outline:2px solid red;
outline-offset:15px;
}
Property Description CSS
appearance Allows you to make an element look like a standard user interface element 3
box-sizing Allows you to define certain elements to fit an area in a certain way 3
icon Provides the author the ability to style an element with an iconic equivalent 3
nav-down Specifies where to navigate when using the arrow-down navigation key 3
nav-index Specifies the tabbing order for an element 3
nav-left Specifies where to navigate when using the arrow-left navigation key 3
nav-right Specifies where to navigate when using the arrow-right navigation key 3
nav-up Specifies where to navigate when using the arrow-up navigation key 3
outline-offset Offsets an outline, and draws it beyond the border edge 3
resize Specifies whether or not an element is resizable by the user 3

CSS3 Ref.


References

About Us

Home
About Us
Contact Us
Sitemap

Tools

Google PageRank
Alexa Rank
Keywords Density

Accounts

Register Account
Login
Valid XHTML 1.0 TransitionalValid CSS!
Web Directory


2006 - 2012 © Leakbali.com - Free Web Tutorial, Free Web Articles, Web Sharing, Source Codes, Web References