溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

css實(shí)現(xiàn)圖片右上角添加復(fù)選框的方法

發(fā)布時間:2020-06-15 10:59:23 來源:億速云 閱讀:577 作者:Leah 欄目:web開發(fā)

這篇文章給大家分享的是css實(shí)現(xiàn)圖片右上角添加復(fù)選框的方法,相信大部分人都還沒學(xué)會這個技能,為了讓大家學(xué)會,給大家總結(jié)了以下內(nèi)容,話不多說,一起往下看吧。

頁面如下:

<%@ 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>

關(guān)于css實(shí)現(xiàn)圖片右上角添加復(fù)選框的方法就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,可以學(xué)到更多知識。如果覺得文章不錯,可以把它分享出去讓更多的人看到。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI