Writing /volume1/Web/Public/dokuwiki/data/log/deprecated/2024-11-15.log failed
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
study:javascript:jquery:z-index [2010/10/11 09:00] – banana | study:javascript:jquery:z-index [2010/10/16 10:21] (現在) – banana | ||
---|---|---|---|
行 9: | 行 9: | ||
< | < | ||
<script type=" | <script type=" | ||
+ | <script type=" | ||
<style type=" | <style type=" | ||
- | html, body{ | + | div.sample{ |
- | height: | + | width: 300px; |
- | margin: | + | height: 240px; |
- | } | + | background-color:# |
- | div.sample{ | + | position: |
- | width: 300px; | + | padding: |
- | height: 200px; | + | z-index: |
- | background-color: | + | } |
- | position: absolute; | + | select.sample{ |
- | padding: 10px; | + | z-index: |
- | z-index: 100; | + | position: |
- | } | + | text-align: |
- | select.sample{ | + | border-style: |
- | z-index: 1; | + | border-width: |
- | position: absolute; | + | border-color: |
- | text-align: | + | } |
- | border-style: | + | #shim{ |
- | border-width: | + | z-index: |
- | border-color: | + | position: |
- | } | + | visibility: hidden; |
- | #shim{ | + | } |
- | z-index: 10; | + | </ |
- | position: absolute; | + | <script language=" |
- | display: none; | + | <!-- |
- | } | + | $(function(){ |
- | </ | + | $("# |
- | <script language=" | + | }); |
- | var dragItem = null; | + | |
- | var initEventX, initEventY; | + | |
- | var initLeft, initTop; | + | |
- | // | + | |
- | onload = function | + | |
- | document.documentElement.onmousemove = dragMove; | + | |
- | document.documentElement.onmouseup = dragOff; | + | |
- | } | + | |
- | // | + | |
- | function | + | |
- | var src = e.originalTarget; | + | |
- | if(document.all){ | + | |
- | e = event; | + | |
- | src = e.srcElement; | + | |
- | } | + | |
- | + | ||
- | dragItem = obj; | + | |
- | initEventX = e.screenX; | + | |
- | initEventY = e.screenY; | + | |
- | initLeft = parseInt(dragItem.style.left.replace(' | + | |
- | initTop = parseInt(dragItem.style.top.replace(' | + | |
- | return false; | + | |
- | } | + | |
- | + | ||
- | // | + | |
- | function dragOff(e){ | + | |
- | dragItem = null; | + | |
- | } | + | |
- | + | ||
- | // | + | |
- | function dragMove(e){ | + | |
- | if(document.all)e = event; | + | |
- | if(!e || !dragItem) | + | |
- | return; | + | |
- | + | ||
- | dragItem.style.left = (initLeft + e.screenX - initEventX) + ' | + | |
- | dragItem.style.top = (initTop + e.screenY - initEventY) + ' | + | |
- | + | ||
- | setShim(dragItem); | + | |
- | return false; | + | |
- | } | + | |
- | + | ||
- | // | + | |
- | function setShim(obj){ | + | |
- | var shim = $(' | + | |
- | + | ||
- | // | + | |
- | shim.style.left = obj.style.left; | + | |
- | shim.style.top = obj.style.top; | + | |
- | shim.style.width = obj.offsetWidth; | + | |
- | shim.style.height = obj.offsetHeight; | + | |
- | shim.style.display = ' | + | |
- | } | + | |
// --> | // --> | ||
</ | </ | ||
行 97: | 行 44: | ||
<iframe scrolling=" | <iframe scrolling=" | ||
IE6でselectタグ(プルダウン)がz-indexを無視する対策 | IE6でselectタグ(プルダウン)がz-indexを無視する対策 | ||
- | < | + | < |
マウスでドラッグができます。< | マウスでドラッグができます。< | ||
width: | width: | ||
- | height: 200px;<br /> | + | height: 240px;<br /> |
background-color: | background-color: | ||
position: absolute;< | position: absolute;< | ||
padding: 10px;<br /> | padding: 10px;<br /> | ||
< | < | ||
- | left: 50px;<br /> | + | left: 150px;<br /> |
top: 250px;< | top: 250px;< | ||
<br /> | <br /> | ||
行 122: | 行 69: | ||
</ | </ | ||
</ | </ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
===== iframe issue ===== | ===== iframe issue ===== | ||
行 128: | 行 102: | ||
===== reference ===== | ===== reference ===== | ||
- [[http:// | - [[http:// | ||
+ | - [[http:// | ||