浏览器默认样式:User Agent Style Sheet

本文介绍了浏览器默认样式,即User Agent Style Sheet。通过F12开发者工具,可以查看Firefox、Chrome和Safari的UA样式,但Internet Explorer的不可见。内容包括解释默认样式的概念,并以input元素的focus状态为例进行说明。
摘要由CSDN通过智能技术生成

1.什么是浏览器默认样式?

如图所示,F12开发者工具中可以看到当前的样式用到的CSS是什么:user agent stylesheet
在这里插入图片描述

2.如何获取到对应的css?

  • Mozilla Firefox: https://dxr.mozilla.org/mozilla-central/source/layout/style/res/html.css
  • Google Chrome: https://chromium.googlesource.com/chromium/blink/+/master/Source/core/css/html.css
  • Safari (WebKit): https://trac.webkit.org/browser/trunk/Source/WebCore/css/html.css
  • Internet Explorer: You can’t view Internet Explorer’s UA Stylesheet because it’s not open source.

3.如何理解默认样式?

比如:

input元素的focus状态:

/* focusable content: anything w/ tabindex >=0 is focusab
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值