Make the div element look like a button:
div { appearance:button; -moz-appearance:button; /* Firefox */ -webkit-appearance:button; /* Safari 和 Chrome */ }
There are more instances at the bottom of the page.
Browser support
Appearance properties are not supported by all major browsers.
Firefox supports alternative -moz-appearance properties.
Safari and Chrome support alternative -webkit-appearance properties.
Definitions and usages
The appearance property allows you to make an element look like a standard user interface element.
Default: | normal |
---|---|
Inheritance: | no |
Version: | CSS3 |
JavaScript syntax: | object .style.appearance="button" |
Grammar
appearance: normal|icon|window|button|menu|field;
Value | Describe |
---|---|
normal | Renders an element as a regular element. |
icon | Renders the element as an icon (small picture). |
window | Renders the element as a view port. |
button | Renders the element as a button. |
menu | Renders the element as a set of options for the user to choose from. |
field | Renders the element as an input field. |