html - 如何隐藏 html 表单下拉列表中的箭头按钮?

标签 html css forms drop-down-menu printing

<分区>

Possible Duplicate:
How can I style an html select box to omit drop down arrow for print?

我正在为 html 表单创建一个打印页面,在表单中我希望只显示所选选项的文本,而不是框或下拉按钮。如何才能做到这一点?最好使用纯 CSS。

最佳答案

You can refer this link that will shed some light on your need
http://imar.spaanjaars.com/240/how-do-i-hide-screen-elements-when-a-page-is-printed





<html>
<head>
  <title>Non Printable Stuff</title>
  <link href="/Styles/MainStyle.css" rel="stylesheet" type="text/css">
  <link href="/Styles/PrintStyle.css" rel=" stylesheet" type="text/css" media="print">

  <style type="text/css" media="print">
    .NonPrintable
    {
      display: none;
    }
  </style>

</head>
<body>
  <input type="button" value="I am hidden" class="NonPrintable">
</body>
</html> 


</head>
<body>
  <input type="button" value="I am hidden" class="NonPrintable">
</body>
</html> 

关于html - 如何隐藏 html 表单下拉列表中的箭头按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13913704/

相关文章:

css - 带有 img 溢出问题的 div 内部的 div,(包括 jsfiddle)

javascript - 填写表格 - Smarty

javascript - react 表单验证

php - 有没有办法从 2 个不同的表单插入数据并插入到列中的 1 行?

带有 Logo 和导航的 HTML5/CSS Sticky Header

javascript - 如何关闭 html5 浏览器工具提示验证消息?

javascript - 在 URL 中使用 anchor 或数据过滤器

javascript - 如何使用 angular1 让图像在点击时显示在前面/后面?

python - 在 HTML 中查找和替换字符串

Javascript 代码在启动时运行一次(addEventListener 不起作用)