使用 Dreamweaver 时 HTML 按钮不响应 CSS

标签 html css dreamweaver

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

我的 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;
    }
<a href="#" class="returnhome">Return Home</a>

Here is what live view from Dreamwweaver is showing

最佳答案

把那个 #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;
}
<a href="methandrailhome.html" class="returnhome">Return Home</a>

关于使用 Dreamweaver 时 HTML 按钮不响应 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44420363/

相关文章:

html - 使用 css、html 和 dreamweaver 将表格放在图像之上

php - Dreamweaver 和 MYSQL 的 ConnectionString

javascript - 从另一个页面 JavaScript 中提取字符串

html - Perl - 将用户输入的 cgi 表单数据传递给 perl 程序,然后将其放入 mysql 数据库

javascript - 为什么这个slideUp功能不流畅?

html - 导航按钮下方没有空格

javascript - 使用鼠标滚轮放大图像上的特定点

html - 另一种 CCS 形式对齐

php - 如何使用 PHP 动态插入 CSS 类?

javascript - 如何从其他网址自动重定向?