css 中clip rect可以满足你的要求

解决方案 »

  1.   

    这个我实验过了  但是 在透视区域是选不到当前div层对象的
      

  2.   

    SORRY,少看了个条件,晚上我试试其他的方法吧,用滤镜有可能可以实现
      

  3.   

    http://diy.kadang.com/diy/diy34.html 就是类似这个网站的编辑功能只要图片移动到 部分在编辑区域,显示图片
    部分在非编辑区域,透视到底图
    就是这个功能
     帮我讲解下原理 谢谢
    新手学习中  呵呵
      

  4.   

    这个网站的功能只要在图片上面在放了一个position为absolute的DIV,DIV里面放个图片就可以了实现了,网站上的具体代码没看
      

  5.   

    我顶,hbhbhbhbhb1021(天外水火(我要多努力)) 你真强
    我要狂学JS
      

  6.   

    "在图片上面在放了一个position为absolute的DIV"
    是不是 比如图片1.jpg做为底图,上面再在特定的区域设置一个position为absolute的DIV
    能不能给个 具体的设置 示例
    通过这个position为absolute的DIV 就能透视到下一个图层吗??
      

  7.   

    我的QQ是44714773
    邮箱是 [email protected]
      

  8.   

    给你个例子,如果带移动的比较麻烦,差不多就是JS动态操作
    <div id="progress_bg" style="position:absolute;top:0px;left:0px;width: 500px; height: 100%;width:500px;background:url(http://diy.kadang.com/kadang/ecommerce/style/default/diy/images/diy_65.png);text-align:center;z-index:3;filter:alpha(Opacity=40)"></div>
    <div id="progress_fg"  style="position:absolute;top:0px;left:470;width: 50px; height: 20px;z-index:4;border-left:thin solid red;border-top:thin solid red;border-bottom:thin solid red">asdasd</div>
    <div style="position:absolute;top:0px;left:500px;width:50px;z-index:7;border-right:thin solid red;border-top:thin solid red;border-bottom:thin solid red">&nbsp;</div>
    <div style="position:absolute;top:0px;left:500px;width: 100%; height: 100%;z-index:6;background-color:white"></div>
      

  9.   

    对啊 再 请问下 div中 css或filter有没有能实现
    一半透明一半显示
     图片可以使用shadow滤镜吗
      

  10.   

    我的QQ是44714773
    邮箱是 [email protected]
    msn同上
    希望大家给我 讲解下原理
    大家共同研究学习哈哈~~~
    先谢谢大家
      

  11.   

    以前写的,不用filter css实现filter,还没有写完,用样式1可用:D,图片下载完成后有效。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title> - http://www.never-online.net </title>
        <meta http-equiv="ImageToolbar" content="no" />
        <meta name="author" content="never-online, BlueDestiny"/>
        <meta name="keywords" content="never modules, Mozilla CSS, C#, .net, Reference, BlueDestiny, never-online"/>
        <meta name="description" content="javascript reference, c sharp artilces"/>
        <meta name="creator.name" content="never-online, BlueDestiny" />
        <style type="text/css" media="all" title="Default">
          .myFilterWrap { position:relative; border:1px solid #555; }
          .myFiltercss  { position:absolute; clip:rect(0 0 0 0); }
        </style>
        <script type="text/javascript">
        //<![CDATA[
        // http://www.never-online.net
        // by never-online
        var mysrc = "http://zi.csdn.net/2007.04/windows%20internal4.16.gif";    function myFilter (src, dir, isfilterin) {      if (!document.body) return false;
          var cachep = new Image();  cachep.src = src;
          var nDelay = 10; var strFt = "";      var wrap  = document.createElement("DIV");
          var image = document.createElement("IMG");
          wrap.className = "myFilter";
          document.body.appendChild(wrap);
          
          image.height = cachep.height; image.width  = cachep.width;
          image.src    = cachep.src; image.className = "myFiltercss";
          wrap.appendChild(image);      function fnFt (dir) {
            if (1==dir) {
              return "rect("+(cnt++)+" auto auto auto)";
            } else if (2==dir) {
              return "rect(auto "+(cnt++)+" auto auto)";
            } else if (3==dir) {
              return "rect(auto auto "+(cnt++)+" auto)";
            } else if (4==dir) {
              return "rect(auto auto auto "+(cnt++)+")";
            } else {
              return "rect("+(cnt++)+" "+(cnt++)+" "+(cnt++)+" "+(cnt++)+")";
            }
          };
          
          
          var cnt = 0; cachep.onload = function Fn () {
            image.style.clip = fnFt(1);
            if (cnt<=100) this._timeout=window.setTimeout(Fn, nDelay);
            else window.clearTimeout(this._timeout);
          };    }
        //]]>
        </script>
      </head>  <body id="www.never-online.net">
        <script type="text/javascript">
        //<![CDATA[
          myFilter.call(this, mysrc);
        //]]>
        </script>
      </body>
    </html>
      

  12.   

    div拖动的图片的那一部分,就把图片的那一部分显示出来
    要怎样实现?