情侣打印样式表问题
我想做的事我认为不可能,但我还是问=>
首先 - 打印时我不会显示图像,因为我的页面可能会变得很重,或者至少有几个合适尺寸的图像会耗尽墨水。那么是否可以不显示图像而显示图像的 ALT 文本,以便用户知道图像是什么。
其次 - 当用户打印表单时,由于表单的样式有点难看。有没有办法更改输入以仅显示输入的文本而不显示其他内容。
还有一个类似的问题~打印样式表 - 将输入转换为文本~我知道这可以使用 jQuery 来完成,但是有没有 CSS Only 方法来实现这一点?
谢谢!
编辑 - 我想出了我的第二个问题。我将表单边框和背景设置为白色以匹配页面。换句话说,它只隐藏和显示文本。 =>
What I want to do I do not think is possible but I ask anyway =>
First - I am not displaying images when printed as my pages can get image heavy or at least a couple decent size images that would eat ink up. So is it possible to not display images yet display the ALT text of the image so the user will know what the image was.
Second - When a user prints a form it is kinda ugly as the forms are styled. Is there a way to change the input to display just the text of the inputs and nothing else.
There is a similar question to this ~ Print Stylesheet - Converting inputs to text ~ I understand that this could be done using jQuery but is there a CSS Only method to achieving this?
Thanks!
EDIT - I figured out my second question. I made the forms border and background white to match the page. In other words it hides and shows only the text. =>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,有。它被称为@media,并且已经在主要浏览器中得到支持一段时间了。
所以,假设您有类似的内容:
您的样式表可能类似于:
Yes, there is. It's called @media and has been supported in major browsers for a while.
So, let's say that you had something like:
Your style sheet could be something like: