appearance 属性允许您使元素看上去像标准的用户界面元素。
案例:
使 div 元素看上去像一个按钮
<!DOCTYPE html> <html> <head> <style> div { appearance:button; -moz-appearance:button; /* Firefox */ -webkit-appearance:button; /* Safari and Chrome */ } </style> </head> <body> <p><b>注释:</b>Internet Explorer 和 Opera 不支持 appearance 属性。</p> <div>一些文本。</div> </body> </html>
效果

tips:
浏览器支持
所有主流浏览器都不支持 appearance 属性。
Firefox 支持替代的 -moz-appearance 属性。
Safari 和 Chrome 支持替代的 -webkit-appearance 属性。
|
语法:
normal 将元素呈现为常规元素。
icon 将元素呈现为图标(小图片)。
window 将元素呈现为视口。
button 将元素呈现为按钮。
menu 将元素呈现为一套供用户选择的选项。
field 将元素呈现为输入字段。 本文转自TBHacker博客园博客,原文链接:http://www.cnblogs.com/jiqing9006/p/5090667.html,如需转载请自行联系原作者
|
