在css中添加了额外的边界值(Extra border value added in css)

编程入门 行业动态 更新时间:2024-10-27 16:31:26
在css中添加了额外的边界值(Extra border value added in css)

虽然我指定了“border:1 px”,但在Firebug中进行检查会发现一些额外的附加价值。 它来自哪里? 我在node.js上使用ejs。

Although I specified the "border: 1 px", inspecting in the Firebug reveals some extra added value. Where is it coming from? I am using ejs on node.js.

最满意答案

正如您在提供的图像中看到的那样,显然您有一个名为reset.css的样式表文件,另一个以js.css开头并以js.css 。

你把它们添加到你的页面了吗? 你是否对你的元素应用了内联样式?

在页面加载后检查脚本以查看函数是否应用此边框。

如果你想让你的风格在内联风格上“赢”,那就添加!important的规则。 喜欢:

div { border: 1px solid black !important; }

as you can see in the image you provided, apparently you have a stylesheet file named reset.css and another one that starts with reserv and end with js.css.

did you added them to your page? do you apply inline-styling to your elements?

check your scripts to see if a function apply this border after the page loads..

If you want you style to 'win' over the inline-style, add !important to the rules. like:

div { border: 1px solid black !important; }

更多推荐

本文发布于:2023-04-29 08:32:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1335855.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:边界   css   Extra   added   border

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!