圖片放大置中,放大置中

來源:互聯網
上載者:User

圖片放大置中,放大置中

<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>圖片放大</title><meta name="description" content=""><meta name="keywords" content=""><style type="text/css" media="screen">*{margin:0; padding:0;}    ul,li{margin-right: 0; padding:0;}    li{list-style:none;}    a{text-decoration: none;}    .clearfix:before,.clearfix:after{display: table; content: "";}      .clearfix:after{overflow: hidden; clear: both;}    .clearfix{zoom:1;}    body{width: 100%; height: 100%; background-color: #000; _position: relative; overflow:hidden;}    #box{width:366px; margin:0 auto; position: relative;}    #box li{width:100px; height:100px; border:1px solid #ddd; background:green; margin:10px; float:left; color:#fff; line-height: 24px; filter:alpha(opacity=40); opacity: 0.4}</style><!-- <script src="startmove.js"></script> --><script>function getStyle(obj,attr){    if(obj.currentStyle){        return obj.currentStyle[attr];    }else{        return getComputedStyle(obj,false)[attr];    }}function startmove(obj, json,fn){    clearInterval(obj.timer);    obj.timer= setInterval(function(){        var flag = true;        for(var attr in json){            // 取當前值            var iCur = 0;            if(attr == 'opacity'){                iCur= parseInt(parseFloat(getStyle(obj,attr))*100);            }else{                iCur= parseInt(getStyle(obj,attr));                }                        // 計算速度            var iSpeed = (json[attr] - iCur)/8;            iSpeed = iSpeed>0?Math.ceil(iSpeed):Math.floor(iSpeed);            // 檢測所有的運動是否都結束了,如果沒有,繼續運動            if(iCur != json[attr]){                flag = false;            }            if(attr == 'opacity'){                  obj.style.filter = 'alpha(opacity='+ (iCur + iSpeed) +')';                obj.style.opacity = (iCur + iSpeed)/100;            }else{                obj.style[attr] = iCur + iSpeed + 'px';            }                    }        // 如果所有運動都結束了,那flag則為true,那就停止所有定時器,        if(flag){            clearInterval(obj.timer);            // 運動結束時,回呼函數            if(fn){                fn();            }        }    },30);}</script><script>window.onload = function(){var oUl = document.getElementById('box');var aLi = oUl.getElementsByTagName('li');var minZindex = 1;// 布局轉換for(var i=0; i<aLi.length; i++){aLi[i].innerHTML = 'left:' + aLi[i].offsetLeft + '<br>top:' + aLi[i].offsetTop;aLi[i].style.left = aLi[i].offsetLeft + 'px';aLi[i].style.top = aLi[i].offsetTop + 'px';}for(var i=0; i<aLi.length; i++){aLi[i].style.margin = 0;aLi[i].style.position = 'absolute';}for(var i=0; i<aLi.length; i++){aLi[i].onmouseover =function(){startmove(this,{width:200,height:200,marginLeft:-50, marginTop:-50,opacity:100});// z-index極限值為2的31次方 this.style.zIndex = minZindex++;}aLi[i].onmouseout =function(){startmove(this,{width:100,height:100,marginLeft:0, marginTop:0,opacity:40});}}}</script></head><body><ul class="clearfix" id="box"><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li><li></li></ul></body></html>


用PS做照片 想讓他置中縮小 就是縮小與放大都置中

如果是背景層就直接調整映像大小就行了
如果是某個圖層 就按【CTRL+T】再按著【SHIFT鍵】來縮放就行了
 
Word 組織圖放大後,只往右邊放大怎讓它置中對齊

用拉的 或者是ctrl+a 然後置中
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.