怎么修改谷歌浏览器文件提交按钮样式_Chrome的默认按钮样式

这篇博客讨论了如何在CSS中获取默认的Chrome按钮样式。作者指出,浏览器和操作系统通常负责渲染默认按钮,而纯CSS无法直接复制这种样式。虽然可以逐个重建背景图片、边框和圆角等元素来模仿,但完全匹配可能很困难。如果愿意使用jQuery,库如jQuery UI提供了一种更简单的方法来实现类似效果。
摘要由CSDN通过智能技术生成

Is it possbile to get the default Chrome button style in CSS?

But i want this button CSS code...

解决方案

If you want the pure CSS rules, you can inspect the button element and check out the entries saying "user agent stylesheet".

In my Chrome 9, they look like this:

input, textarea, keygen, select, button, isindex, datagrid {

margin: 0em;

font: -webkit-small-control;

color: initial;

letter-spacing: normal;

word-spacing: normal;

....... etc. much more

however, if you literally want the rules for natively rendering a button, in order to render the same button in other browsers, I think that's impossible: A default button will be rendered by the Browser's UI or even the underlying operating system. In my Windows 7, the default button looks like this:

This style, as far as I know, is not in the CSS rules. You would have to rebuild it using background images, borders, rounded corners etc. If you don't mind using jQuery, libraries like jQuery UI have seducingly simple solutions for this.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值