草庐IT

border-width

全部标签

html - Safari 10.1 – 文本对齐 : justify text goes outside the border in RTL languages

我在body元素中有一个带有文本段落的HTML标记。在CSS样式表中,我添加了:body{text-align:justify;color:black;background-color:white;font-size:23;letter-spacing:0.05pt;line-height:125%;font-size:1.25em;margin:0.00em20em;text-indent:0em;font-weight:normal;font-style:normal;direction:rtl;}当我在Safari10.1中加载它时,文本超出了正文边框。但是相同的标记在旧版本的S

html - 3 列 : one with max-width, 其他两列最小宽度

三列必须填满父容器的宽度。左右栏的宽度不得小于150px。中心列的宽度不得超过200像素。我做了areferencepage使用JavaScript进行布局。是否可以使用纯CSS进行相同的布局?screenshothttp://elv1s.ru/files/html+css/min-width_max-width_columns.png它应该至少在IE8、Firefox3.6、Chrome7、Safari5和Opera10.63中工作。 最佳答案 Table-basedsolution通过@PanyaKor.

html - 3 列 : one with max-width, 其他两列最小宽度

三列必须填满父容器的宽度。左右栏的宽度不得小于150px。中心列的宽度不得超过200像素。我做了areferencepage使用JavaScript进行布局。是否可以使用纯CSS进行相同的布局?screenshothttp://elv1s.ru/files/html+css/min-width_max-width_columns.png它应该至少在IE8、Firefox3.6、Chrome7、Safari5和Opera10.63中工作。 最佳答案 Table-basedsolution通过@PanyaKor.

javascript - 在 box-sizing :border-box is set in CSS? 时,JavaScript 中有没有一种方法可以直接获取元素的内容宽度

如果我们在CSS中设置它(自动前缀):*{box-sizing:border-box}然后getComputedStyle(elem).width包括元素的填充。现场演示:http://jsfiddle.net/simevidas/EpUnp/我想获取元素内容框的宽度(不带内边距)。是否有用于此的标准API,还是我必须手动减去填充? 最佳答案 getBoxQuadsAPI可以做到。(它在FirefoxNightly中受支持)。varquad=elem.getBoxQuads({box:'content'})[0];varconten

javascript - 在 box-sizing :border-box is set in CSS? 时,JavaScript 中有没有一种方法可以直接获取元素的内容宽度

如果我们在CSS中设置它(自动前缀):*{box-sizing:border-box}然后getComputedStyle(elem).width包括元素的填充。现场演示:http://jsfiddle.net/simevidas/EpUnp/我想获取元素内容框的宽度(不带内边距)。是否有用于此的标准API,还是我必须手动减去填充? 最佳答案 getBoxQuadsAPI可以做到。(它在FirefoxNightly中受支持)。varquad=elem.getBoxQuads({box:'content'})[0];varconten

html - border-radius 在 Firefox 中对输入类型不起作用

在webkit浏览器中一切正常。但是当我尝试将border-radius与input[type="url"]一起使用时,它不起作用。甚至不只是使用输入。一切仍然有效。CSSsection.crypterinput{border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;padding:5px;}HTML为什么Firefox不允许我设置输入的样式? 最佳答案 看起来您需要先设置边框样式:input{border:1pxsolid#666666;bord

html - border-radius 在 Firefox 中对输入类型不起作用

在webkit浏览器中一切正常。但是当我尝试将border-radius与input[type="url"]一起使用时,它不起作用。甚至不只是使用输入。一切仍然有效。CSSsection.crypterinput{border-radius:15px;-moz-border-radius:15px;-webkit-border-radius:15px;padding:5px;}HTML为什么Firefox不允许我设置输入的样式? 最佳答案 看起来您需要先设置边框样式:input{border:1pxsolid#666666;bord

html - CSS 拼图 : How to add background-image and set height/width on empty span?

我已经在几个span元素上设置了background-image,但它们没有显示,我想是因为我的height和width设置被忽略。HTML来源:CSS:span.sidebar-poster{margin-bottom:10px;background-repeat:no-repeat;width:160px;}span#starthere{background-image:url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou180.jpg);height:285px;}span#starthere:h

html - CSS 拼图 : How to add background-image and set height/width on empty span?

我已经在几个span元素上设置了background-image,但它们没有显示,我想是因为我的height和width设置被忽略。HTML来源:CSS:span.sidebar-poster{margin-bottom:10px;background-repeat:no-repeat;width:160px;}span#starthere{background-image:url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou180.jpg);height:285px;}span#starthere:h

HTML/CSS : total page width is wider than content

我有一个奇怪的问题,找不到原因!我有以下网页:http://uk.translation-vocabulary.com/de-german并且页面的感知宽度可能比内容的宽度大300px。因此,即使视口(viewport)被水平拉伸(stretch)以匹配可见内容,水平滚动条也会出现。我一直在用Firebug检查元素,试图找到罪魁祸首。到目前为止没有成功。此效果在Firefox、Safari、Chrome中观察到。未经测试:IE。非常感谢任何帮助!本杰明。 最佳答案 诊断罪魁祸首的两种方法。方法一在“元素”选项卡中打开Chrome开发