CSS Div相对位置

时间:2012-05-11 11:18:27

标签: css html

是否可以在该模型上创建布局?

neccessary behaviour

1 个答案:

答案 0 :(得分:1)

HTML

<div class="layout">
    <span id="click">Click me</span
    <div id="mydiv"></div>
</div>

<强> CSS

.layout {position:relative;height:200px}
#mydiv {width:100px; height:50px;bottom:0}

<强> JS

$("#click").click(function(){
    $("#mydiv").css("position", "absolute");
});