Home >Web Front-end >HTML Tutorial >Hide border and drop-down arrow_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:16:192464browse

Use CSS styles to hide the surrounding borders and drop-down arrows of







The above can be tested on the page to achieve the effect I want. But





If is added outside and displayed in the list, there will be a problem of overlapping Chinese characters.
Please ask an expert to solve it! ! !


Reply to the discussion (solution)

You can change your mind and use js to solve it
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!

function hiddenSelect(){
var slcList=document.getElementsByTagName('select');
var ipt ;
for(var i=0;i ipt = document.createElement("input");
ipt.setAttribute('slcValue',slcList[i].value); // Set the selected value
ipt.value = slcList[i ].options[slcList[i].selectedIndex].text;
slcList[i].parentNode.appendChild(ipt);
slcList[i].style.display="none";
}
}

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn