如何获取元素的所有CSS样式? [英] How can I grab all css styles of an element?

查看:423
本文介绍了如何获取元素的所有CSS样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我喜欢网站的某个元素,并且想将其实现到我的网站中,最简单的方法是什么?有时会有很多CSS文件,很难全部遵循。

解决方案

打开 Firefox ,安装 Firebug ,右键单击所需的元素,选择检查元素,然后打开计算出的区域



您将对该元素应用所有样式



这在使用自己的开发工具的Chrome,Safari,Opera和IE中有效



Opera DragonFly





Firefox (需要插件)





Chrome & Safari Web Inspector 已经是Chrome和Safari的一部分)




If I like an element of a site, and I want to implement it into my site, what is the easiest way to do it? Sometimes there is a lot of CSS files, that is hard to follow all of them.

解决方案

open Firefox, install Firebug right click on the element you want, choose Inspect element and then open the Computed area

you will have ALL STYLES applied to that element

This is valid in Chrome, Safari, Opera and IE with their own development tools

Opera (DragonFly is already installed with Opera)

Firefox (Needs FireBug plugIn)

Internet Explorer (Needs IE Developer Toolbar plugin)

Chrome & Safari (Web Inspector is already part of Chrome and Safari)

这篇关于如何获取元素的所有CSS样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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