有没有办法告诉html元素忽略任何样式表? [英] Is there a way to tell an html element to ignore any stylesheets?

查看:131
本文介绍了有没有办法告诉html元素忽略任何样式表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试向已经具有全局选择样式的网页添加下拉菜单。有没有办法告诉新的选择列表忽略全局样式?有大约1到2百万现有下拉使用全局样式,所以我不想重构现有的html。

I'm attempting to add a drop down to a page that already has a global "select" style. Is there a way to tell the new select list to ignore the global style? There's about 1 to 2 zillion existing drop downs that use the global style, so I don't want refactor the existing html.

推荐答案

没有简单的方法来做你所要求的,一种方法是创建一个CSS类,重置所有适当的属性为一个特定的元素和它的孩子,使它更完整,这里是一个好的起点特定于CSS的重置

there is no easy way to do what you are asking, one approach is to create a CSS class that resets all appropriate attributes for a specific element and its children to make it more complete, here is a good starting point Element specific CSS reset

这篇关于有没有办法告诉html元素忽略任何样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆