0
我有,基本上工作的對話框一個簡單的腳本:爲什麼jQuery對話框上的關閉按鈕在與Web頁面集成時向左移動?
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(function() { $("#dialog").dialog();
});
});
</script>
</head>
<body">
<div id="dialog" title="Message">
<p>Hello! Did you know you could save 2%</p>
</div>
</body>
但是,它集成到一些網站有時不能很好地工作。請查看鏈接上的區別: http://www.jboston.net/2013/Message1.png 如何修復將關閉按鈕向左移動?
螢火顯示該按鈕的下面的代碼:
<button class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close" role="button" aria-disabled="false" title="close" style="margin-right: 328.5px;"><span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span><span class="ui-button-text">close</span></button>
所有款式都是從jQuery的ui.css除了一個風格從HTML來:「保證金右:328.5px;」
檢查與調試工具,CSS規則給出了這樣的行爲 –
請參閱問題 –
'保證金右編輯的文本:328.5px ;'解釋確切 –