本篇文章给大家带来的内容是关于css如何实现图片右上角添加复选框 (代码) ,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
页面如下:
<%@ page language="java" import="java.util.*" pageencoding="utf-8"%><%string path = request.getcontextpath();string basepath = request.getscheme()+"://"+request.getservername()+":"+request.getserverport()+path+"/";%> <!doctype html public "-//w3c//dtd html 4.01 transitional//en"><html> <head> <base href="<%=basepath%>"> <title>测试</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <style type="text/css"> .main{ float:left; margin-left:8px; } </style> </head> <body> <div class="ztree"> <ul id="treedemo" class="ztree"></ul> </div> <div class="main" style="position:relative;"> <div class="img"> <img alt="图片名称" src="plug-in/image/desert.jpg" style="width:100px;height:100px"> </div> <div class="checkbox" style="position:absolute;top:0;right:0;z-index:1000"> <input id="box" type="checkbox" name="box"> </div> </div> <div class="main" style="position:relative;"> <div class="img"> <img alt="图片名称" src="plug-in/image/desert.jpg" style="width:100px;height:100px"> </div> <div class="checkbox" style="position:absolute;top:0;right:0;z-index:1000"> <input id="box" type="checkbox" name="box"> </div> </div> <div class="main" style="position:relative;"> <div class="img"> <img alt="图片名称" src="plug-in/image/desert.jpg" style="width:100px;height:100px"> </div> <div class="checkbox" style="position:absolute;top:0;right:0;z-index:1000"> <input id="box" type="checkbox" name="box"> </div> </div> </body></html>
相关推荐:
如何使用css给图片添加双边框效果_html/css_web-itnose
css实现的在图片上面添加文字说明_html/css_web-itnose
以上就是css如何实现图片右上角添加复选框 (代码)的详细内容。