Image magnification method, scroll bar position with the wheel move fixed method, <a></a> to the outer line dashed method: A:focus {outline:none;-moz-outline:none;} ;

Source: Internet
Author: User

Image Amplification Method:

<style type= "Text/css" >
. xt{width:230px; height:230px;}
. tp{width:230px; height:230px; Overflow:hidden;}
. tp img{transition:all 1s ease-out 0s; margin-left:0px; margin-top:0px; perspective-origin:bottom;}
</style>

<body>

<div class= "TP" >
this)" onmouseout= "Hui (this)" src= "c320_ 20160923147459793296513.jpg "/>
</div>


</body>

<script type= "Text/javascript" >
function Bian (a)
{
a. Style.margintop = " -10px";     
a. Style.marginleft = " -10px";     
a. style.height= "260px";     
a. style.width= "260px";     

}
function Hui (a)
{
a.style.height= "230px";
a. style.width= "230px";     
a. Style.margintop = "0px";     
a. Style.marginleft = "0px";     
}
</script>

The scrollbar position moves with the wheel to fix the method:

<style type= "Text/css" >

. t{width:990px; height:80px; Background-color: #F00; font-size:23px;}

</style>

<body>

<div style= "width:100%; height:80px; Background-color: #000; position:fixed; " ></div>

<div style= "width:200px; height:300px; Background-color: #00F;" ></div>

<div class= "T" ></div>

<div style= "width:800px; height:1000px; Background-color: #09F; " ></div>

</body>

<script type= "Text/javascript" >

$ (document). Ready (function (e)
{
var off=$ (". T"). offset (); Gets the distance from the top of the Div
var of=off.top-160; div distance from top-the total height of the div height plus the top div height
$ (window). Scroll (function ()
{
var scr=$ (window). scrolltop (); Gets the y-axis distance of the scroll bar
if (scr>of)
{
$ (". T"). CSS ("position", "fixed");
$ (". T"). CSS ("Top", "80px"); Adjust as needed
$ (". T"). CSS ("Background-color", "#906"); Adjust as needed
$ (". T"). CSS ("left", "275px"); Adjust as needed
$ (". T"). CSS ("width", "800px"); Adjust as needed
$ (". T"). CSS ("height", "60px"); Adjust as needed

}
if (scr<of)
{
$ (". T"). CSS ("position", "absolute");
$ (". T"). CSS ("Top", "230px"); Adjust as needed
$ (". T"). CSS ("Background-color", "#F00"); Adjust as needed
$ (". T"). CSS ("left", "180px"); Adjust as needed
$ (". T"). CSS ("width", "990px"); Adjust as needed
$ (". T"). CSS ("height", "80px"); Adjust as needed
}

})
});

Image magnification method, scroll bar position with the wheel to move the fixed method, <a></a> go to the outer dotted line method: A:focus {outline:none;-moz-outline:none;} ;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.