我想将top
的{{1}}和bottom
位置应用于header
div,但这不起作用。我究竟做错了什么?如何将NewUser
添加到CSS?像!important;
$("header")!important}
<div id="divNewUser" class="CreateUserModal" runat="server">
<p>
Use the form below to create a new user account.
</p>
</div>
<script>
function showDialog() {
var modal_dialog = $("#divNewUser");
modal_dialog.css({
position: {
my: "top",
at: "bottom",
of: $("header")
}
});
}
</script>
答案 0 :(得分:0)
答案 1 :(得分:0)
<script>
function showDialog() {
var modal_dialog = $("#divNewUser");
modal_dialog.addClass("test");
});
}
.test{
top:10px;
bottom:10px;
}
就像你可以设置位置