萬盛學電腦網

 萬盛學電腦網 >> 網頁制作 >> DivCSS教程 >> 巧用CSS3 border實現圖片遮罩效果代碼

巧用CSS3 border實現圖片遮罩效果代碼

代碼如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>無標題文檔</title> 
<style type="text/css"> 
.trans { 
-webkit-transition: 0.3s ease; 
-moz-transition: 0.3s ease; 
-ms-transition: 0.3s ease; 
-o-transition: 0.3s ease; 
transition: 0.3s ease; 

.test_outer { 
display: block; 
width: 200px; 
height: 200px; 
margin: 1em auto; 
position: relative; 
overflow: hidden; 

.test_cover { 
width: 40px; 
height: 40px; 
border: 200px solid rgba(0, 0, 0, .35); 
border-radius: 50%; 
position: absolute; 
left: -115px; 
top: -165px; 

.test_cover:hover { 

copyright © 萬盛學電腦網 all rights reserved