如何在浏览器中禁用 CSS 以进行测试 [英] How to disable CSS in Browser for testing purposes

查看:26
本文介绍了如何在浏览器中禁用 CSS 以进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以禁用浏览器(Firefox、Chrome...)中的所有外部 CSS?

Is there any way I can disable all external CSS in a browser (Firefox, Chrome...)?

当使用较慢的互联网连接时,有时浏览器只会加载裸 HTML,而没有 CSS 信息.看起来页面已被放置在屏幕上.您也会在 StackOverflow 中注意到这一点.

When using slower internet connection, sometimes only the bare HTML is loaded by the browser without the CSS info. It looks like the page has been laid raw on the screen. You would have noticed this with StackOverflow too.

我想确保即使没有加载 CSS 文件,我的网页也能正常显示.

I want to make sure that my web page shows up OK even if the CSS files are not loaded.

我并不是说我想将外部 CSS 转换为内联.但我想要一种从浏览器中显式禁用所有 CSS 的方法,以便我可以以更好、更易读的方式重新定位我的元素.

I didn't mean I want to convert external CSS to inline. But I want a way to explicitly disable all CSS from the browser so that I can reposition my elements in a better, readable way.

我知道我可以删除 <link rel='stylesheet'>条目,但如果我有很多链接页面怎么办?

I know I can remove the <link rel='stylesheet'> entries, but what if I have a lot of linked pages?

推荐答案

FirefoxChrome 能够做到这一点

The Web Developer plugin for Firefox and Chrome is able to do this

安装插件后,该选项在 CSS 菜单中可用.例如,CSS >禁用样式 >禁用所有样式

Once you have installed the plugin the option is available in the CSS menu. For example, CSS > Disable Styles > Disable All Styles

或者,在启用开发者工具栏的情况下,您可以按 Alt+Shift+A.

Alternatively with the developer toolbar enabled you can press Alt+Shift+A.

这篇关于如何在浏览器中禁用 CSS 以进行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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