温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

css实现图片右上角添加复选框的方法

发布时间:2020-06-15 10:59:23 来源:亿速云 阅读:577 作者:Leah 栏目:web开发

这篇文章给大家分享的是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实现图片右上角添加复选框的方法就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI