问题描述
Chrome 的用户代理样式表为 元素的所有角提供了 5px 的边框半径.我已经尝试通过在我的外部样式表中应用 0px 的半径以及内联元素本身来摆脱这种情况;我已经尝试了 border-radius:0px 和 -webkit-border-radius:0px; 并且我尝试了更具体的 border-top-left-radius:0px(连同它的 -webkit 等价物).
The user-agent stylesheet for Chrome gives a border-radius of 5px to all the corners of a <select> element. I've tried getting rid of this by applying a radius of 0px through my external stylesheet, as well inline on the element itself; I've tried both border-radius:0px and -webkit-border-radius:0px; and I've tried the even more specific border-top-left-radius:0px (along with it's -webkit equivalent).
都没有工作.
当我检查 webkit 开发人员工具中的元素时,计算样式仍然将半径列为 5px.但是,如果我单击它旁边的扩展箭头以查看详细信息,它会显示:element.style - 0px.下面它显示了我给出的 0px 的外部 css 规范,以及 5px 的用户代理样式表规范.后两者都被划掉了,因为它们应该是.
When I examine the element in webkit's developer tools, the Computed Style still lists the radius as 5px. But if I click the expander arrow next to it to see the specifics, it reads: element.style - 0px. And below that it shows the external css specification I gave of 0px, along with the user-agent stylesheet specification of 5px. And both of those latter two are crossed out, as they should be.
有什么想法吗?
推荐答案
这对我有用(样式第一次出现而不是下拉列表):
This works for me (styles the first appearance not the dropdown list):
select {
-webkit-appearance: none;
-webkit-border-radius: 0px;
}
http://jsfiddle.net/fMuPt/
这篇关于从 <select> 中删除圆角Chrome/Webkit 中的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,WP2
查看全文
(adsbygoogle = window.adsbygoogle || []).push({});
相关文章
从< select>中移除圆角元素;
从< select>中移除圆角。元素;
问题与< select>和:之后在WebKit中的CSS;
从< select>中删除下拉箭头元件?;
< select>具有高度的HTML元素;
创建< select>从列表中-缩进子项?;
选择默认值< select> Django中的元素;
选择<选项> < select>来自Chrome扩展内容脚本;
发送多个< select> jQuery POST的元素;
获取所选的< select>元素在飞镖;
当< option>被添加或从< select>中删除时,jquery事件;
如何更改< option>的字体大小. < select>中的元素?;
使用< slot>在本机< select>中元素;
遍历< select>选项;
在< select>中显示数据基于另一个< select>的值;
移除< select>的默认圆形边框Mac OS浏览器中的元素:Chrome;
添加/删除<选项>来自< select>的商品使用javascript;
设置< select> < option>中的颜色颜色;
jQuery< select>更改另一个< select>;
标签到< select>输入元素在html;
在Internet Explorer中设计`< select> ;`;
HTML <select> with background-color <option> tags using Chrome;
< select>中的字体预览下拉列表?;
AngularJs和< select> ;:删除默认的选定选项;
使用< select>和< option>在AngularJS中;
(adsbygoogle = window.adsbygoogle || []).push({});
(adsbygoogle = window.adsbygoogle || []).push({});
前端开发最新文章
为什么Chrome(在Electron内部)突然重定向到chrome-error:// chromewebdata?;
错误102(net :: ERR_CONNECTION_REFUSED):服务器拒绝连接;
如何解决'重定向已被CORS策略阻止:没有'Access-Control-Allow-Origin'标题'?;
如何处理“Uncaught(in promise)DOMException:play()失败,因为用户没有首先与文档交互。”在桌面上使用Chrome 66?;
警告:添加非被动事件侦听器到滚动阻塞'touchstart'事件;
如何在浏览器中播放.TS文件(视频/ MP2T媒体类型)?;
此请求已被阻止;内容必须通过HTTPS提供;
资源解释为样式表,但转换为MIME类型text / html(似乎与web服务器无关);
通过HTTPS加载页面但请求不安全的XMLHttpRequest端点;
拒绝从执行脚本'*',因为它的MIME类型(“应用/ JSON')不是可执行文件,并严格MIME类型检查被启用。;
热门教程
Java教程
Apache ANT 教程
Kali Linux教程
JavaScript教程
JavaFx教程
MFC 教程
Apache HTTP客户端教程
Microsoft Visio 教程
热门工具
Java 在线工具
C(GCC) 在线工具
PHP 在线工具
C# 在线工具
Python 在线工具
MySQL 在线工具
VB.NET 在线工具
Lua 在线工具
Oracle 在线工具
C++(GCC) 在线工具
Go 在线工具
Fortran 在线工具
var eskeys = '从,lt,select>,中,删除,圆角,chrome,webkit,中,的,元素'; var cat = 'qianduan';
登录
关闭
扫码关注1秒登录