【问题标题】:HTML Button not responding to the CSS in live using dreamweaverHTML Button 在使用 Dreamweaver 时不响应 CSS
【发布时间】:2017-06-07 18:36:31
【问题描述】:

大家好,我的 HMTL 有问题,分配给它的 CSS 无法正常工作。该按钮有效,它将按应有的方式链接,但 CSS 没有影响它。 我使用dreamweaver CC,在设计视图中似乎CSS正在运行,但是一旦我在浏览器上实时查看它,它就会恢复到原始状态,我将提供一些代码图片和实时视图来向您展示我的意思。

我的 HTML

<a href="methandrailhome.html" class="returnhome">Return Home</a><!-- end .returnhome -->

我的 CSS

#form .returnhome {

    -moz-box-shadow:inset -4px 2px 0px -13px #ffffff;
    -webkit-box-shadow:inset -4px 2px 0px -13px #ffffff;
    box-shadow:inset -4px 2px 0px -13px #ffffff;
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );
    background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
    background-color:#f9f9f9;
    -webkit-border-top-left-radius:0px;
    -moz-border-radius-topleft:0px;
    border-top-left-radius:0px;
    -webkit-border-top-right-radius:0px;
    -moz-border-radius-topright:0px;
    border-top-right-radius:0px;
    -webkit-border-bottom-right-radius:0px;
    -moz-border-radius-bottomright:0px;
    border-bottom-right-radius:0px;
    -webkit-border-bottom-left-radius:0px;
    -moz-border-radius-bottomleft:0px;
    border-bottom-left-radius:0px;
    text-indent:-1.9px;
    border:2px solid #dcdcdc;
    display:inline-block;
    color:#666666;
    font-family:Arial;
    font-size:13px;
    font-weight:bold;
    font-style:normal;
    height:40px;
    line-height:40px;
    width:95px;
    text-decoration:none;
    text-align:center;
    text-shadow:0px 0px 0px #ffffff;
}

    .returnhome {
    	
    	-moz-box-shadow:inset -4px 2px 0px -13px #ffffff;
    	-webkit-box-shadow:inset -4px 2px 0px -13px #ffffff;
    	box-shadow:inset -4px 2px 0px -13px #ffffff;
    	background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) );
    	background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% );
    	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
    	background-color:#f9f9f9;
    	-webkit-border-top-left-radius:0px;
    	-moz-border-radius-topleft:0px;
    	border-top-left-radius:0px;
    	-webkit-border-top-right-radius:0px;
    	-moz-border-radius-topright:0px;
    	border-top-right-radius:0px;
    	-webkit-border-bottom-right-radius:0px;
    	-moz-border-radius-bottomright:0px;
    	border-bottom-right-radius:0px;
    	-webkit-border-bottom-left-radius:0px;
    	-moz-border-radius-bottomleft:0px;
    	border-bottom-left-radius:0px;
    	text-indent:-1.9px;
    	border:2px solid #dcdcdc;
    	display:inline-block;
    	color:#666666;
    	font-family:Arial;
    	font-size:13px;
    	font-weight:bold;
    	font-style:normal;
    	height:40px;
    	line-height:40px;
    	width:95px;
    	text-decoration:none;
    	text-align:center;
    	text-shadow:0px 0px 0px #ffffff;
    }
&lt;a href="#" class="returnhome"&gt;Return Home&lt;/a&gt;

Here is what live view from Dreamwweaver is showing

【问题讨论】:

  • 由于某种原因,此处未显示 HTML 是 HTML 按钮 返回主页
  • 您的表单中是否有锚点,您的表单是否有 id='form'?

标签: html css dreamweaver


【解决方案1】:

#form 拿出来。

.returnhome {
  -moz-box-shadow: inset -4px 2px 0px -13px #ffffff;
  -webkit-box-shadow: inset -4px 2px 0px -13px #ffffff;
  box-shadow: inset -4px 2px 0px -13px #ffffff;
  background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9));
  background: -moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100%);
  filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9');
  background-color: #f9f9f9;
  -webkit-border-top-left-radius: 0px;
  -moz-border-radius-topleft: 0px;
  border-top-left-radius: 0px;
  -webkit-border-top-right-radius: 0px;
  -moz-border-radius-topright: 0px;
  border-top-right-radius: 0px;
  -webkit-border-bottom-right-radius: 0px;
  -moz-border-radius-bottomright: 0px;
  border-bottom-right-radius: 0px;
  -webkit-border-bottom-left-radius: 0px;
  -moz-border-radius-bottomleft: 0px;
  border-bottom-left-radius: 0px;
  text-indent: -1.9px;
  border: 2px solid #dcdcdc;
  display: inline-block;
  color: #666666;
  font-family: Arial;
  font-size: 13px;
  font-weight: bold;
  font-style: normal;
  height: 40px;
  line-height: 40px;
  width: 95px;
  text-decoration: none;
  text-align: center;
  text-shadow: 0px 0px 0px #ffffff;
}
&lt;a href="methandrailhome.html" class="returnhome"&gt;Return Home&lt;/a&gt;

【讨论】:

    猜你喜欢
    • 2010-12-23
    • 2017-04-03
    • 1970-01-01
    • 2018-10-17
    • 1970-01-01
    • 1970-01-01
    • 2020-07-13
    • 2018-03-15
    • 1970-01-01
    相关资源
    最近更新 更多