CSS3淡入淡出

來源:互聯網
上載者:User

以下均在Chrome Opera FF最新瀏覽器測試過,Safari未測試

1.www.sofchina.com個人技術部落格

CSS3向右滑動效果

a
{
-webkit-transition-property:color,background-color,padding-left;

-webkit-transition-duration:500ms,500ms,500ms;

-moz-transition-property:color,background-color,padding-left;

-moz-transition-duration:500ms,500ms,500ms;

-o-transition-property:color,background-color,padding-left;

-o-transition-duration:500ms,500ms,500ms;

}
a:hover
{
background-color:#efefef;color:#333;padding-left:50px
}
</style>
</head>
<body >
<a href=”#”>向右滑動</a>

</body>

 

2.CSS3翻轉效果

<style type=”text/css”>
img.opacity1
{
-webkit-transition:all 1s ease-in-out;
-moz-transition:all 1s ease-in-out;
-o-transition:all 1s ease-in-out;

}
img.opacity1:hover
{
-webkit-transform:rotate(720deg);//翻轉2圈
-moz-transform:rotate(720deg);
-o-transform:rotate(720deg);
}
</style>
</head>
<body >
<div id=”div1″>

<img src=”img/logo2.png” />

</div>

3.CSS3動態陰影邊框效果

img.opacity1
{
background-color:#5FA0C5;
-webkit-transition:all .5s linear ;
-o-transition:all .5s linear;
-moz-transition:all .5s linear;

}
img.opacity1:hover
{
border:8px solid #041ABF;
box-shadow:3px 4px 5px #98049D;
-webkit-box-shadow:3px 4px 5px #98049D,4px 5px 6px #EF00B3;
-moz-box-shadow:3px 4px 5px #98049D,4px 5px 6px #EF00B3;
-o-box-shadow:3px 4px 5px #98049D,4px 5px 6px #EF00B3;

-moz-border-radius-topleft:8px;
-moz-border-radius-topright:8px;
-moz-border-radius-bottomleft:8px;
-moz-border-radius-bottomright:8px;

-webkit-border-top-left-radius:8px;
-webkit-border-top-right-radius:8px;
-webkit-border-bottom-left-radius:8px;
-webkit-border-bottom-right-radius:8px;

border-top-left-radius:8px;
border-top-right-radius:8px;
border-left-left-radius:8px;
border-left-right-radius:8px;
}
</style>
</head>

<body>
<div id=”div1″><img src=”img/logo2.png” /></div>
</body>

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.