建站知識(shí)
網(wǎng)站設(shè)計(jì)知識(shí) 網(wǎng)站建設(shè)知識(shí) 網(wǎng)絡(luò)營(yíng)銷知識(shí) 微信資訊 常見問題 網(wǎng)站備案 近期客戶網(wǎng)站建設(shè)套餐
標(biāo)準(zhǔn)型網(wǎng)站建設(shè) 精美型網(wǎng)站建設(shè) 營(yíng)銷型網(wǎng)站建設(shè) 高端品牌網(wǎng)站建設(shè) 電子商務(wù)型網(wǎng)站建設(shè) 行業(yè)門戶型網(wǎng)站建設(shè) 手機(jī)網(wǎng)站建設(shè) 微信網(wǎng)站建設(shè)網(wǎng)頁中輕松打造帶有陰影的圖片效果
來源:征帆網(wǎng)絡(luò) 作者:ymars 日期:2013-11-25
實(shí)現(xiàn)頁面圖片陰影特效
給圖片加上陰影效果可以使圖片更具有立體感,下面介紹三種制作方法:
第三種 利用層制作
參看下列代碼:
< html >
< head >
< title >層圖片陰影< /title >
< meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
< /head >
< body bgcolor="#FFFFFF" text="#000000" >
< div id="Layer1" style="position:absolute;left:0px; top:0px; width:246px; height:186px; z-index:1" >
< img src="sample.jpg" width="240" height="180" style="border:white 3 solid" >
< div id="Layer2" style="position:relative; left:10px; top:-180px; width:260px; height:200px; z-index:-1; background-color: #000000; layer-background-color: #000000; border: 1px none #000000;filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=85, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=90, StartY=0, FinishX=100, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=10, StartY=0, FinishX=0, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=10, FinishX=0, FinishY=0)" >< /div >
< /div >
< /body >
< /html >
第二種 利用表格制作
請(qǐng)參看下列代碼:
< html >
< head >
< title >表格圖片陰影< /title >
< meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
< /head >
< body bgcolor="#FFFFFF" text="#000000" >
< table width="263" border="0" cellspacing="0" cellpadding="0" height="203" >
< tr >
< td valign="top" width="243" height="183" colspan="2" rowspan="2" >< img src="sample.jpg" width="240" height="180" >< /td >
< td width="20" height="20" >< /td >
< /tr >
< tr >
< td width="20" height="163" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=10, FinishX=0, FinishY=0)" >< /td >
< /tr >
< tr >
< td width="20" height="20" >< /td >
< td width="223" height="20" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=10, StartY=0, FinishX=0, FinishY=0)" >< /td >
< td width="20" height="20" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0)" >< /td >
< /tr >
< /table >
< /body >
< /html >
做好后的效果如下:
第一種 利用圖象編輯軟件
最常用的圖象編輯軟件是Photoshop,制作過程如下:
1、選取一張圖片;
2、打開Photoshop,為該圖片建立一背景復(fù)本圖層;
3、對(duì)該圖層進(jìn)行描邊和陰影設(shè)置;
4、調(diào)整畫布大小;
5、將圖片保持為jpg文件。
給圖片加上陰影效果可以使圖片更具有立體感,下面介紹三種制作方法:
第三種 利用層制作
參看下列代碼:
< html >
< head >
< title >層圖片陰影< /title >
< meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
< /head >
< body bgcolor="#FFFFFF" text="#000000" >
< div id="Layer1" style="position:absolute;left:0px; top:0px; width:246px; height:186px; z-index:1" >
< img src="sample.jpg" width="240" height="180" style="border:white 3 solid" >
< div id="Layer2" style="position:relative; left:10px; top:-180px; width:260px; height:200px; z-index:-1; background-color: #000000; layer-background-color: #000000; border: 1px none #000000;filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=85, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=90, StartY=0, FinishX=100, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=10, StartY=0, FinishX=0, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=10, FinishX=0, FinishY=0)" >< /div >
< /div >
< /body >
< /html >
第二種 利用表格制作
請(qǐng)參看下列代碼:
< html >
< head >
< title >表格圖片陰影< /title >
< meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
< /head >
< body bgcolor="#FFFFFF" text="#000000" >
< table width="263" border="0" cellspacing="0" cellpadding="0" height="203" >
< tr >
< td valign="top" width="243" height="183" colspan="2" rowspan="2" >< img src="sample.jpg" width="240" height="180" >< /td >
< td width="20" height="20" >< /td >
< /tr >
< tr >
< td width="20" height="163" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=10, FinishX=0, FinishY=0)" >< /td >
< /tr >
< tr >
< td width="20" height="20" >< /td >
< td width="223" height="20" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=10, StartY=0, FinishX=0, FinishY=0)" >< /td >
< td width="20" height="20" bgcolor="#000000" style="filter:Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=0, FinishY=100) Alpha(Opacity=100, FinishOpacity=0, Style=1, StartX=0, StartY=0, FinishX=100, FinishY=0)" >< /td >
< /tr >
< /table >
< /body >
< /html >
做好后的效果如下:
第一種 利用圖象編輯軟件
最常用的圖象編輯軟件是Photoshop,制作過程如下:
1、選取一張圖片;
2、打開Photoshop,為該圖片建立一背景復(fù)本圖層;
3、對(duì)該圖層進(jìn)行描邊和陰影設(shè)置;
4、調(diào)整畫布大小;
5、將圖片保持為jpg文件。
相關(guān)文章列表