Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如果某些特定属性上的外部css代码没有';我不是在一页上工作,而是在另一页上工作?_Javascript_Html_Css - Fatal编程技术网

Javascript 如果某些特定属性上的外部css代码没有';我不是在一页上工作,而是在另一页上工作?

Javascript 如果某些特定属性上的外部css代码没有';我不是在一页上工作,而是在另一页上工作?,javascript,html,css,Javascript,Html,Css,我正在处理一个登录表单,我遇到了这样一种情况:我的border-bottom属性在表单上不起作用,但在另一个简单的hello-world页面上也起作用 这是在DELL INSPIRON 3000系列上运行的Windows 10。我所有的作品都使用升华文本编辑器。我尝试在我的一个网页上运行我的CSS属性border bottom,但这段代码在简单的hello world网页上运行得非常好 。登录框h1{ 边框底部:5px纯蓝色; 填充:10px; } 登录 工作正常。。。您的html中

我正在处理一个登录表单,我遇到了这样一种情况:我的border-bottom属性在表单上不起作用,但在另一个简单的hello-world页面上也起作用

这是在DELL INSPIRON 3000系列上运行的Windows 10。我所有的作品都使用升华文本编辑器。我尝试在我的一个网页上运行我的CSS属性
border bottom
,但这段代码在简单的hello world网页上运行得非常好

。登录框h1{
边框底部:5px纯蓝色;
填充:10px;
}

登录





工作正常。。。您的html中需要有错误


测试

您上面提供的代码实现了您所期望的功能(点击运行代码片段)。它可能会被一些css覆盖,这就是为什么它不能在您的登录页面中工作

要强制浏览器使用css而不被覆盖,请尝试以下操作

.login-box h1 {
  border-bottom: 5px solid blue !important;
  padding: 10px !important;
}

显示html程序使用浏览器中的开发工具并检查元素。它将显示CSS规则是否被其他规则覆盖。寻求调试帮助的问题(“为什么此代码不工作?”)必须包含重现问题本身中错误所需的最短代码。请看:没有HTML,我们不可能知道出了什么问题。考虑编辑你的问题。登录



这是上述CSS代码的HTML代码的一部分。@ShashankKumar您提供的代码如您所愿。请确保您的代码复制了您试图解决的问题。如果没有他的html,您如何提供答案?登录



这是上述CSS代码的HTML代码的一部分。我已经成功地在内部CSS中运行了代码,但没有作为外部CSS运行。
.login-box h1 {
  border-bottom: 5px solid blue !important;
  padding: 10px !important;
}