【问题标题】:How to link thumbnail to a video on a new page [closed]如何将缩略图链接到新页面上的视频[关闭]
【发布时间】:2025-12-02 16:00:02
【问题描述】:

当我单击缩略图时,我希望打开另一个网页,其中包含该缩略图的视频。我该怎么做?感谢您的宝贵时间。

【问题讨论】:

  • 这是 HTML 101 的东西。

标签: javascript php jquery html


【解决方案1】:
<a style="
  background: url('*Thumbnail URL*');
  background-size: cover;
  background-position: center;
  height: 270px;
  width: 540px;"
href="*Video URL*"></a>

*Thumbail URL*

*Video URL*

【讨论】:

  • 我添加了必要的url(' ') 语法和background-size: contain; 属性,这将使背景图像在该元素内达到最大尺寸,同时保持其纵横比并且不裁剪任何内容。
  • 我看到了,非常感谢,你很宽容
最近更新 更多