html - Box border for each letter inside span -
i have span below
<span style="font-size:18px; font-weight:bold;">8342</span>
how can put black box around each number inside span using css?
i want below image
please check demo
<span style="font-size:18px; font-weight:bold;" class="test">8342</span> .pwn{ border: 2px solid black ; display: inline; } var text= $(".test").html(); $(".test").html(''); for(i=0;i<=text.length-1; i++) { var html = text.substr(i,1); var sp="<span style='font-size:18px; font-weight:bold;' class='pwn'>" + html sp+=" </span> "; $(".test").append(sp); }
Comments
Post a Comment