【问题标题】:how can I do the button that is appears when screen size smaller [closed]屏幕尺寸较小时出现的按钮如何操作[关闭]
【发布时间】:2019-06-10 11:27:54
【问题描述】:

我希望屏幕尺寸较小时出现一个按钮。我该怎么办?

我使用 asp.net。

【问题讨论】:

  • 你谷歌了吗?因为那样你会发现一些有用的东西,比如w3schools.com/cssref/css3_pr_mediaquery.asp
  • 我用谷歌搜索了很多。但我没有发现任何有用的东西
  • @Andersen,我找到了你的回复,但这不是我想要的
  • @fico 你想在后面的代码中做吗?

标签: jquery html css asp.net


【解决方案1】:

这是一个非常简单的示例,您可以如何使用Media Queries

更新:这里有一个完整且最新的Media Queries 示例。

您需要将窗口大小调整为 600 像素或更小,以便您可以看到按钮。

button {
  display: none;
}

@media only screen and (max-width: 600px) {
  button {
    display: block;
  }
}
<html>
<head>

</style>
</head>
<body>

<button>Test</button>

<p>Resize the browser window. When the width of this document is 600 pixels or less, the button is visible, otherwise not".</p>

</body>
</html>

【讨论】:

猜你喜欢
  • 2021-07-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-06-30
  • 1970-01-01
相关资源
最近更新 更多