checkbox - Display an image in place of a check mark with codeigniter -
i found code on here. know if work codeigniter. want ability click on image , perform same function check box. after click image display new image overlay check mark on top of image.
code found.
input[type=checkbox] { display: block; width: 30px; height: 30px; background-repeat: no-repeat; background-position: center center; background-size: contain; -webkit-appearance: none; outline: 0; } input[type=checkbox]:checked { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewbox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path id="checkbox-3-icon" fill="#000" d="m81,81v350h350v81h81z m227.383,345.013l-81.476-81.498l34.69-34.697l46.783,46.794l108.007-108.005 l34.706,34.684l227.383,345.013z"/></svg>'); } input[type=checkbox]:not(:checked) { background-image: url('data:image/svg+xml;utf8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"> <path id="checkbox-9-icon" d="m391,121v270h121v121h391z m431,81h81v350h350v81z"></path> </svg>'); }
<input type="checkbox" id="check" /> <div></div>
Comments
Post a Comment