从 <select> 中删除圆角Chrome/Webkit 中的元素

本文介绍了从 <select> 中删除圆角Chrome/Webkit 中的元素的处理方法,对大家解决问题具有一定的参考价值

问题描述

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/ 这篇关于从 &lt;select&gt; 中删除圆角Chrome/Webkit 中的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,WP2 查看全文 (adsbygoogle = window.adsbygoogle || []).push({}); 相关文章 从&lt; select&gt;中移除圆角元素; 从&lt; select&gt;中移除圆角。元素; 问题与&lt; select&gt;和:之后在WebKit中的CSS; 从&lt; select&gt;中删除下拉箭头元件?; &lt; select&gt;具有高度的HTML元素; 创建&lt; select&gt;从列表中-缩进子项?; 选择默认值&lt; select&gt; Django中的元素; 选择&lt;选项&gt; &lt; select&gt;来自Chrome扩展内容脚本; 发送多个&lt; select&gt; jQuery POST的元素; 获取所选的&lt; select&gt;元素在飞镖; 当&lt; option&gt;被添加或从&lt; select&gt;中删除时,jquery事件; 如何更改&lt; option&gt;的字体大小. &lt; select&gt;中的元素?; 使用&lt; slot&gt;在本机&lt; select&gt;中元素; 遍历&lt; select&gt;选项; 在&lt; select&gt;中显示数据基于另一个&lt; select&gt;的值; 移除&lt; select&gt;的默认圆形边框Mac OS浏览器中的元素:Chrome; 添加/删除&lt;选项&gt;来自&lt; select&gt;的商品使用javascript; 设置&lt; select&gt; &lt; option&gt;中的颜色颜色; jQuery&lt; select&gt;更改另一个&lt; select&gt;; 标签到&lt; select&gt;输入元素在html; 在Internet Explorer中设计`&lt; select&gt ;`; HTML &lt;select&gt; with background-color &lt;option&gt; tags using Chrome; &lt; select&gt;中的字体预览下拉列表?; AngularJs和&lt; select&gt ;:删除默认的选定选项; 使用&lt; select&gt;和&lt; option&gt;在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&gt,中,删除,圆角,chrome,webkit,中,的,元素'; var cat = 'qianduan'; 登录 关闭 扫码关注1秒登录

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1167

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1069

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this-&gt;id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:806

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this-&gt;id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:898

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:930

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:876

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:863

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:833

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1719

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1308