<p class="sougouContent"> Use CSS styles to hide the surrounding borders and drop-down arrows of <select>. It is mainly used for printing. For the sake of beauty, it only wants to display the selected content. <br> I used style control, and the effect can be achieved by testing it alone, but when placed in the <td> in the list, the position is not beautiful, and the selected content presses the list line. What should I do? <br> <style> <br> .select-style{ <br> position:absolute; <br> overflow:hidden; <br> } <br> .select-style select{ <br> margin:-2px; <br> margin-right:-20px; <br> </style> <br> <span class="select-style"> <br> <select name="selStyle" style="font-size : 16px;color:black;background-color: #FFFFFF;border:0px solid #FFFFFF;"> <br> <option value="0" style="width:20px;border:0px solid #FFFFFF;" >张</option> <br> <option value="1" style="width:20px;">台</option> <br> <option value="2" style="width :20px;">米</option> <br> <option value="3" style="width:20px;">piece</option> <br> <option value="4" style="width:20px;">piece</option> <br> <option value="5" style="width:20px;">block</option> <br> </select> ; <br /> </span> <br> The above can be tested on the page to achieve the effect I want. But <br> <td width="50px;"> <br> <span class="select-style"> <br> <select name="selStyle" style="font-size: 16px; color:black;background-color: #FFFFFF;"> <br> <option value="0" style="width:20px;">张</option> <br> <option value=" 1" style="width:20px;">台</option> <br> <option value="2" style="width:20px;">米</option> <br> < option value="3" style="width:20px;">pieces</option> <br> <option value="4" style="width:20px;">pieces</option> <br> <option value="5" style="width:20px;">block</option> <br> </select> <br> </span> <br> </td> <br> If <td> is added outside and displayed in the list, there will be a problem of overlapping Chinese characters. <br> Please ask an expert to solve it! ! ! </p> <br> <h2>Reply to the discussion (solution)</h2> <p class="sougouAnswer"> You can change your mind and use js to solve it<br> Hide the select and add a textbox to display the value of the select. The approximate logic is as follows , the code has not been tested, and there may be wrong words. I did not use an IDE, so I uploaded the code directly! <br> <br> function hiddenSelect(){ <br> var slcList=document.getElementsByTagName('select'); <br> var ipt ; <br> for(var i=0;i<slcList.length;i ) { <br> ipt = document.createElement("input"); <br> ipt.setAttribute('slcValue',slcList[i].value); // Set the selected value <br> ipt.value = slcList[i ].options[slcList[i].selectedIndex].text; <br> slcList[i].parentNode.appendChild(ipt); <br> slcList[i].style.display="none"; <br> } <br> } <br> </p>