How can I display the checkbox over the images for selection?

后端 未结 3 973
感情败类
感情败类 2021-01-04 17:28

I want to display a checkbox for selection on the right bottom of every image..

How can i do something like this?

Please remember that clicking on image has

3条回答
  •  时光取名叫无心
    2021-01-04 18:01

    If only selecting/dis-selecting of the checkbox is your requirement then What I would suggest is as under :

    Step 1: Place the image and the checkbox inside a block (may it be a div or table)
    Step 2: Provide that block relative position with some specific height and width.
    Step 3: For checkbox, give it absolute position and set the right and bottom gaps (based on your requirement).


    For instance, the code should look like this

        

    And the css for the same is

    .img_block {position:relative; width:230px; margin-right:20px; margin-bottom:10px; height:30px;}
    .chkbox {position:absolute; right:5px; bottom:3px;}

    I hope this suits your requirement.

提交回复
热议问题