1
如何通過html評論創建疊加層?如何通過html評論創建一個覆蓋?
請參閱我的代碼波紋管:
<style type="text/css">
*{margin:0;padding:0;}
body{padding:50px;}
.box{width:50px;height:50px; background-color:tan;}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
function create_part_overlay(){
// how can I create an overlay on top of the part 1?
// the overlay should cover form '<!-- bof ... -->' to '<!-- eof ... -->'
}
</script>
<button onclick="create_part_overlay()">create part overlay</button>
<p>hello world</p>
<!-- bof part (1) -->
<div class="box">box</div>
<h3>good boy</h3>
<div class="box">box</div>
<!-- eof part (1) -->
<p>hello world</p>
不,沒那麼簡單,我想創建基於評論的覆蓋,位置是抓住的形式,其中評論 –
然後,你必須使用createElement創建動態div標記。並據此適用上述風格。 –