1

可能重复:
如何设置 html 选择框的样式以省略打印的下拉箭头?

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

4

1 回答 1

1
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> 
于 2012-12-17T12:03:14.100 回答