`

安卓默认浏览器内核:Webkit内核的浏览器默认CSS属性

阅读更多
/*
* The default style sheet used to render HTML.
*
* Copyright (C) 2000 Lars Knoll (knoll@kde.org)
* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB.  If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
*/

@namespace "http://www.w3.org/1999/xhtml";

html {
display: block
}

/* children of the <head> element all have display:none */
head {
display: none
}

meta {
display: none
}

title {
display: none
}

link {
display: none
}

style {
display: none
}

script {
display: none
}

/* generic block-level elements */

body {
display: block;
margin: 8px
}

p {
display: block;
margin: 1.0__qem 0px
}

div {
display: block
}

layer {
display: block
}

article, aside, footer, header, nav, section {
display: block
}

marquee {
display: inline-block;
overflow: -webkit-marquee
}

address {
display: block
}

blockquote {
display: block;
margin: 1__qem 40px 1em 40px
}

q {
display: inline
}

q:before {
content: '"'
/* FIXME: content: open-quote; */
}

q:after {
content: '"'
/* FIXME: content: close-quote; */
}

center {
display: block;
/* special centering to be able to emulate the html4/netscape behaviour */
text-align: -webkit-center
}

hr {
display: block;
margin: 0.5em auto;
border-style: inset;
border-width: 1px
}

map {
display: inline
}

/* heading elements */

h1 {
display: block;
font-size: 2em;
margin: .67__qem 0 .67em 0;
font-weight: bold
}

h2 {
display: block;
font-size: 1.5em;
margin: .83__qem 0 .83em 0;
font-weight: bold
}

h3 {
display: block;
font-size: 1.17em;
margin: 1__qem 0 1em 0;
font-weight: bold
}

h4 {
display: block;
margin: 1.33__qem 0 1.33em 0;
font-weight: bold
}

h5 {
display: block;
font-size: .83em;
margin: 1.67__qem 0 1.67em 0;
font-weight: bold
}

h6 {
display: block;
font-size: .67em;
margin: 2.33__qem 0 2.33em 0;
font-weight: bold
}

/* tables */

table {
display: table;
border-collapse: separate;
border-spacing: 2px;
border-color: gray
}

thead {
display: table-header-group;
vertical-align: middle;
border-color: inherit
}

tbody {
display: table-row-group;
vertical-align: middle;
border-color: inherit
}

tfoot {
display: table-footer-group;
vertical-align: middle;
border-color: inherit
}

/* for tables without table section elements (can happen with XHTML or dynamically created tables) */
table > tr {
vertical-align: middle;
}

col {
display: table-column
}

colgroup {
display: table-column-group
}

tr {
display: table-row;
vertical-align: inherit;
border-color: inherit
}

td, th {
display: table-cell;
vertical-align: inherit
}

th {
font-weight: bold
}

caption {
display: table-caption;
text-align: -webkit-center
}

/* lists */

ul, menu, dir {
display: block;
list-style-type: disc;
margin: 1__qem 0 1em 0;
-webkit-padding-start: 40px
}

ol {
display: block;
list-style-type: decimal;
margin: 1__qem 0 1em 0;
-webkit-padding-start: 40px
}

li {
display: list-item
}

ul ul, ol ul {
list-style-type: circle
}

ol ol ul, ol ul ul, ul ol ul, ul ul ul {
list-style-type: square
}

dd {
display: block;
-webkit-margin-start: 40px
}

dl {
display: block;
margin: 1__qem 0 1em 0
}

dt {
display: block
}

ol ul, ul ol, ul ul, ol ol {
margin-top: 0;
margin-bottom: 0
}

/* form elements */

form {
display: block;
margin-top: 0__qem
}

label {
cursor: default;
}

legend {
display: block;
padding-left: 2px;
padding-right: 2px;
border: none
}

fieldset {
display: block;
margin-left: 2px;
margin-right: 2px;
padding: 0.35em 0.75em 0.625em;
border: 2px groove ThreeDFace
}

button {
-webkit-appearance: button;
}

input, textarea, keygen, select, button, isindex, datagrid {
margin: 0__qem;
font: -webkit-small-control;
color: initial;
letter-spacing: normal;
word-spacing: normal;
line-height: normal;
text-transform: none;
text-indent: 0;
text-shadow: none;
display: inline-block;
text-align: -webkit-auto;
}

input[type="hidden"] {
display: none
}

input, input[type="password"], input[type="search"], isindex {
-webkit-appearance: textfield;
padding: 1px;
background-color: white;
border: 2px inset;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
cursor: auto;
}

input[type="search"] {
-webkit-appearance: searchfield;
-webkit-box-sizing: border-box;
}

input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: searchfield-cancel-button;
display: inline-block;
}

input[type="search"]::-webkit-search-decoration {
-webkit-appearance: searchfield-decoration;
display: inline-block;
}

input[type="search"]::-webkit-search-results-decoration {
-webkit-appearance: searchfield-results-decoration;
display: inline-block;
}

input[type="search"]::-webkit-search-results-button {
-webkit-appearance: searchfield-results-button;
display: inline-block;
}

input::-webkit-input-list-button {
-webkit-appearance: list-button;
display: inline-block;
}

input::-webkit-inner-spin-button {
-webkit-appearance: inner-spin-button;
display: inline-block;
}

input::-webkit-outer-spin-button {
-webkit-appearance: outer-spin-button;
display: inline-block;
margin-left: 2px;
}

textarea {
-webkit-appearance: textarea;
background-color: white;
border: 1px solid;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
-webkit-box-orient: vertical;
resize: auto;
cursor: auto;
padding: 2px;
white-space: pre-wrap;
word-wrap: break-word;
}

input::-webkit-input-placeholder, isindex::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
color: darkGray;
}

input[type="password"] {
-webkit-text-security: disc !important;
}

input[type="hidden"], input[type="image"], input[type="file"] {
-webkit-appearance: initial;
padding: initial;
background-color: initial;
border: initial;
}

input[type="file"] {
-webkit-box-align: baseline;
text-align: start !important;
}

input:-webkit-autofill {
background-color: #FAFFBD !important;
background-image:none !important;
}

input[type="radio"], input[type="checkbox"] {
margin: 3px 0.5ex;
padding: initial;
background-color: initial;
border: initial;
}

input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button {
-webkit-appearance: push-button;
white-space: pre
}

input[type="button"], input[type="submit"], input[type="reset"], input[type="file"]::-webkit-file-upload-button, button {
-webkit-box-align: center;
text-align: center;
cursor: default;
color: ButtonText;
padding: 2px 6px 3px 6px;
border: 2px outset ButtonFace;
background-color: ButtonFace;
-webkit-box-sizing: border-box
}

input[type="range"] {
-webkit-appearance: slider-horizontal;
padding: initial;
border: initial;
margin: 2px;
}

input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: sliderthumb-horizontal;
}

input[type="button"]:disabled, input[type="submit"]:disabled, input[type="reset"]:disabled,
input[type="file"]:disabled::-webkit-file-upload-button, button:disabled,
select:disabled, keygen:disabled, optgroup:disabled, option:disabled, datagrid:disabled {
color: GrayText
}

input[type="button"]:active, input[type="submit"]:active, input[type="reset"]:active, input[type="file"]:active::-webkit-file-upload-button, button:active {
border-style: inset
}

input[type="button"]:active:disabled, input[type="submit"]:active:disabled, input[type="reset"]:active:disabled, input[type="file"]:active:disabled::-webkit-file-upload-button, button:active:disabled {
border-style: outset
}

area, param {
display: none
}

input[type="checkbox"] {
-webkit-appearance: checkbox;
-webkit-box-sizing: border-box;
}

input[type="radio"] {
-webkit-appearance: radio;
-webkit-box-sizing: border-box;
}

keygen, select {
-webkit-appearance: menulist;
-webkit-box-sizing: border-box;
-webkit-box-align: center;
border: 1px solid;
-webkit-border-radius: 5px;
white-space: pre;
-webkit-rtl-ordering: logical;
color: black;
background-color: white;
cursor: default;
}

select[size],
select[multiple],
select[size][multiple] {
-webkit-appearance: listbox;
-webkit-box-align: start;
border: 1px inset gray;
-webkit-border-radius: initial;
white-space: initial;
}

select[size="0"],
select[size="1"] {
-webkit-appearance: menulist;
-webkit-box-align: center;
border: 1px solid;
-webkit-border-radius: 5px;
white-space: pre;
}

datalist {
display: none;
}

optgroup {
font-weight: bolder;
}

option {
font-weight: normal;
}

/* datagrid */

datagrid {
height: 150px; /* We don't use width:300px in CSS, since we want width:intrinsic and width:min-intrinsic to reset to 300 properly. */
-webkit-appearance: datagrid;
-webkit-box-sizing: border-box;
-webkit-rtl-ordering: logical;
color: black;
background-color: white;
cursor: default;
border: 1px inset gray;
white-space: initial;
}

/* inline elements */

u, ins {
text-decoration: underline
}

strong, b {
font-weight: bolder
}

i, cite, em, var, address {
font-style: italic
}

tt, code, kbd, samp {
font-family: monospace
}

pre, xmp, plaintext, listing {
display: block;
font-family: monospace;
white-space: pre;
margin: 1__qem 0
}

big {
font-size: larger
}

small {
font-size: smaller
}

s, strike, del {
text-decoration: line-through
}

sub {
vertical-align: sub;
font-size: smaller
}

sup {
vertical-align: super;
font-size: smaller
}

nobr {
white-space: nowrap
}

/* states */

:focus { 
outline: auto 5px -webkit-focus-ring-color
}

/* Read-only text fields do not show a focus ring but do still receive focus */
html:focus, body:focus, input[readonly]:focus { 
outline: none
}

input:focus, textarea:focus, isindex:focus, keygen:focus, select:focus {
outline-offset: -2px
}

input[type="button"]:focus,
input[type="checkbox"]:focus,
input[type="file"]:focus,
input[type="hidden"]:focus,
input[type="image"]:focus,
input[type="radio"]:focus,
input[type="reset"]:focus,
input[type="search"]:focus,
input[type="submit"]:focus,
input[type="file"]:focus::-webkit-file-upload-button {
outline-offset: 0
}

a:-webkit-any-link {
color: -webkit-link;
text-decoration: underline;
cursor: auto;
}

a:-webkit-any-link:active {
color: -webkit-activelink
}

/* HTML5 ruby elements */

ruby, rt {
text-indent: 0; /* blocks used for ruby rendering should not trigger this */
line-height: normal;
}

ruby > rt {
display: block;
font-size: 60%; /* make slightly larger than 50% for better readability */
text-align: center;
}

ruby > rp {
display: none;
}

/* other elements */

noframes {
display: none
}

frameset, frame {
display: block
}

frameset {
border-color: inherit
}

iframe {
border: 2px inset
}

/* noscript is handled internally, as it depends on settings */
 
分享到:
评论

相关推荐

    Webkit内核的浏览器默认CSS属性

    这个总结了Webkit内核的浏览器的默认CSS属性,也就是解释HTML标签时候的默认样式,比如&lt;p&gt;&lt;br /&gt;这种的默认样式……

    web端浏览器不同内核兼容性

    web开发因为不同浏览器内核不同,页面呈现效果不同,所以自己总结了一些针对浏览器默认样式解决的样式方法和内核描述。

    CSS自定义WebKit内核浏览器滚动条实现代码

    关于自定义浏览器滚动条的样式这一块,如果网站可以不考虑非WebKit内核浏览器的话,倒是可以试试只用CSS去实现。 简单地修改一下几项,就可以看到效果了: ::-webkit-scrollbar{width:12px; height:12px;} /*滚动...

    纯CSS改变webkit内核浏览器的滚动条样式

    基于webkit的浏览器现在可以自定义其滚动条的样式了,实现代码如下: 复制代码代码如下:::-webkit-scrollbar/*整体部分*/{width: 10px;height:10px;} ::-webkit-scrollbar-track/*滑动轨道*/{-webkit-box-shadow: ...

    各大主流浏览器的内核区分

    前端开发中,CSS的格式兼容,JS等脚本语言的浏览器识别,代码兼容,一直是一个很大的难题。主要是因为诸多浏览器采取的内核不尽相同,在渲染效果,解析代码时规则也不一样。所以:本文详细讲解目前各主流浏览器的...

    前端vue面试题大全汇总

    这些浏览器的内核分别是什么? 2、每个HTML 文件里开头都有个很重要的东西,Doctype,知道这是干什么的吗? 3、Quirks 模式是什么?它和Standards 模式有什么区别. 4、div+css 的布局较table 布局有什么优点? 5、img...

    一段非常简单的js判断浏览器的内核

    大家应该还记得JavaScript行内样式怎么写...而我们可以将所有的内核前缀给枚举出来,然后获取其某个CSS的值,即可做出判断。代码如下: function getVendorPrefix() { // 使用body是为了避免在还需要传入元素 var b

    详解如何自定义CSS滚动条的样式

    本文会介绍CSS滚动条选择器,并在demo中展示如何在Webkit内核浏览器和IE浏览器中,自定义一个横向以及一个纵向的滚动条。 0.需求 有的时候我们不想使用浏览器默认的滚动条样式,因为不够定制化和美观。那么如何...

    CSS3改变浏览器滚动条样式

    注:该方法只适用于 -webkit- 内核浏览器 浏览器滚动条太宽,太丑,影响日常开发怎么办,改TA 滚动条外观由2部分组成:1.滚动条整体滑轨 2.滚动条滑轨内滑块 在CSS中滚动条由3部分组成 name::-webkit-scrollbar //...

    lizhongzhen11#lizz-blog#浏览器相关1

    浏览器的工作原理读《webkit技术内幕》了解浏览器内核系列读《webkit技术内幕》了解浏览器内核一读《webkit技术内幕》了解浏览器内核二——内部架构读

    WebKit中可用的CSS高级特性

    在阅读下面文章前,你可以先了解下软件开发网以前介绍的WebKit文章:浏览器Apple Safari和Google Chrome内核webkit WebKit是Safari和Google Chrome浏览器的渲染引擎。所以,本文中的诀窍在Safari3/4和Chrome1.0/2.0...

    浏览器内核以及代表作品

    Trident 代表作:IE 元老级内核之一,由微软开发,并于1997年10月首次在ie 4.0中使用,凭借其windows...前端程序员做浏览器兼容一般也不再会考虑ie 8之前的浏览器了。 Gecko 代表作:Mozilla 元老级内核之一,由Netsc

    CSS3 Notes: -webkit-box-reflect实现倒影的实例

    在使用webkit内核的浏览器中(chrome,safari,移动端浏览器),可以使用-webkit-box-reflect属性来实现倒影,语法如下所示 [ above | below | right | left ]? &lt;length&gt;? &lt;image&gt;? 该值包涵了三部分:方位+偏移量+遮罩...

    WebKit内核源代码分析(3)

    浏览器的请求一般是以页面请求为单位,当用户通过网址栏输入一个url,浏览器就开始一个页面请求。而一个页面请求可能包含有一个到多个页面子帧,...Page类是WebKit中非常重要的一个类,它就象内核对外的一个聚合器。

    程序员面试刷题的书哪个好-Front-end-Interview:前端面试

    Safari:webkit内核 Opera:以前是presto内核,Opera现已改用Google Chrome的Blink内核 Chrome:Blink(基于webkit,Google与Opera Software共同开发) 介绍一下你对浏览器内核的理解? 主要分成两部分:渲染引擎和JS...

    BAT及各大互联网公司2014前端笔试面试题(Html,Css篇)

    而更多的题目是我一路以来...• IE: trident内核 • Firefox:gecko内核 • Safari:webkit内核• Opera:以前是presto内核,Opera现已改用Google Chrome的Blink内核 • Chrome:Blink(基于webkit,Google与Opera Softwa

    纯CSS3实现的翻页效果源码

    纯CSS3实现的翻页效果源码 鼠标悬停在页面上翻页,移开鼠标翻回来。 只支持webkit内核浏览器(如:iphone、ipad、android浏览器,及PC上的Chrome、Safari浏览器)

Global site tag (gtag.js) - Google Analytics