在图片任意位置上添加文本
2014-08-02 11:00
162 查看
找了好半天,看到前辈的这个,现做以记录,以便后续使用。
<!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>
<title>test</title>
<style>
.box {position:relative;width:500px;height:100px;margin:50px;border:solid 1px #999;}
.box .banner {width:500px;height:100px;}
.tabdiv {position:absolute;left:0px;top:0px; overflow:hidden;}
.tabdiv a {float:left;display:block;padding:3px 10px;border:solid 1px #0066cc;font-weight:bold;background-color:#0099dd; color:#ffffff;text-decoration:none;filter:alpha(opacity=30);opacity:0.3;}
.tabdiv a:hover {filter:alpha(opacity=100);opacity:1;}
.tab2 {left:0px;top:74px;*top:78px;}
</style>
</head>
<body>
<div class="box">
<img class="banner" src="../../resource/images/changecard.png" />
<div class="tabdiv">
<a href="#">jiage</a><a href="#">新闻中心</a><a href="#">关于我们</a>
</div>
<div style="clear:both;"></div>
</div>
<div class="box">
<img class="banner" src="http://www.baidu.com/img/baidu_logo_jr_1008_qx.gif" />
<div class="tabdiv tab2">
<a href="#">首页</a><a href="#">新闻中心</a><a href="#">关于我们</a>
</div>
<div style="clear:both;"></div>
</div>
</body>
</html>
<!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>
<title>test</title>
<style>
.box {position:relative;width:500px;height:100px;margin:50px;border:solid 1px #999;}
.box .banner {width:500px;height:100px;}
.tabdiv {position:absolute;left:0px;top:0px; overflow:hidden;}
.tabdiv a {float:left;display:block;padding:3px 10px;border:solid 1px #0066cc;font-weight:bold;background-color:#0099dd; color:#ffffff;text-decoration:none;filter:alpha(opacity=30);opacity:0.3;}
.tabdiv a:hover {filter:alpha(opacity=100);opacity:1;}
.tab2 {left:0px;top:74px;*top:78px;}
</style>
</head>
<body>
<div class="box">
<img class="banner" src="../../resource/images/changecard.png" />
<div class="tabdiv">
<a href="#">jiage</a><a href="#">新闻中心</a><a href="#">关于我们</a>
</div>
<div style="clear:both;"></div>
</div>
<div class="box">
<img class="banner" src="http://www.baidu.com/img/baidu_logo_jr_1008_qx.gif" />
<div class="tabdiv tab2">
<a href="#">首页</a><a href="#">新闻中心</a><a href="#">关于我们</a>
</div>
<div style="clear:both;"></div>
</div>
</body>
</html>
相关文章推荐
- 图片任意位置添加水印
- EditText 中在在光标位置添加 文本 或 图片
- 向图片任意位置添加logo
- 图片任意位置添加水印
- 图片任意位置添加水印
- 任意位置添加FLASH
- 使用CSS给ASP.NET中的Button按钮添加一个指定位置的图片
- [原创]扩展GridView实现多选(全选)、点击行任意位置选择行、选中变色、添加双击事件等
- 自定义的symbian图片控件,可在任意的位置放图片
- c# 添加图片水印,可以指定水印位置+生成缩略图
- Android下图片可拖动到任意位置的效果的实现源码
- 1.3 实现图片压缩、添加文字或图片水印、指定位置裁剪等功能的ImageUtility(内有效果图) (转)
- c# 添加图片水印,可以指定水印位置+生成缩略图
- iPhone在任意位置显示图片代码
- listview练习,当连接类型为文本时图片地址的文本框隐藏,textbox渲染到客户端的ID不是服务端所写的clientID,只能另外添加一个属性myid
- 自定义的symbian图片控件,可在任意的位置放图片
- c# 添加图片水印,可以指定水印位置+生成缩略图
- c# 添加图片水印,可以指定水印位置+生成缩略图
- 扩展GridView实现多选(全选)、点击行任意位置选择行、选中变色、添加双击事件等
- 给图片添加图片水印[可按位置,水印图上放大缩小]