我尝试将链接样式化为JQuery UI按钮时出现了一个奇怪的问题。它在Chrome中显示为按钮,在Firefox和IE8中显示为链接。JQuery UI标签不作为Firefox和IE中的按钮样式
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="script/jquery-1.4.2.js"></script>
<script type="text/javascript" src="script/jquery-ui-1.8.9.custom.min.js"></script>
<link rel="stylesheet" type="test/css" href="stylesheet/jquery-ui-1.8.9.custom.css">
<link rel="stylesheet" type="text/css" href="stylesheet/styles.css">
<script type="text/javascript">
$(document).ready(function(){
$("a").button();
});
</script>
<title>Introduction</title>
</head>
<body class="indexbody">
<div class="indexwrapper">
<div id="introduction">
<div class="btn">
<a href="test.html" >link</a>
</div>
</div>
</div>
</body>
</html>
Firebug有什么结果?你看到的UI值设置类属性?你试过什么了?在汤姆克鲁斯的名言中,“帮助我帮助你”。 – jmort253 2011-01-31 03:53:52
Firefox:class =“ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only”Chrome:class =“ui-button”ui-widget“ui-state-default”“ui-corner” -all ui-button-text-only“ 生成的HTML在Firefox和Chrome中完全相同。在IE中没有应用ui-类。 – 2011-01-31 03:56:33
在Chrome中,我看到一个绿色按钮(如预期的那样)。在Firefox和IE中我看到一个链接。 – 2011-01-31 04:05:20