簡體   English   中英

元標記中的 Html 圖像

[英]Html image in a meta tag

我正在使用不和諧,我看到很多人都在做那件事(圖像中的大方塊)。 我嘗試在帶有元標記的 html 中做到這一點,但結果卻是(圖像編號 2)。 我真的很想知道如何做到這一點,有人可以幫我嗎?

圖片一| 圖片二

還有我用來執行此操作的代碼:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
  <meta property="og:title" content="An Image By ItsJustOne#9817">
<meta property="og:description" content="Remember always that there is an end in the tunnel 🥰">
<meta property="og:image" content="https://cdn.discordapp.com/banners/907132383814377502/4aca154cd6040b31aacaaf781877f121.png?size=1024">
    <meta name="viewport" content="width=device-width">
    <title>Why You Are Here?</title>
    <link href="style.css" rel="stylesheet" type="text/css" />
  </head>
  <body>
    Why You Are Here?
    <script src="script.js"></script>
  </body>
</html>

我嘗試使用的圖像是我的不和諧橫幅。

那是4個月前的事了,忘記在這里寫了,在這里問了一個星期后找到了解決辦法!

解決方案很簡單,使用其他元標記,而不是常規標記。 推特元標簽。

<meta name="twitter:title" content="Title">
<meta name="twitter:description" content="Cool description">
<meta name="twitter:image" content="the image link">
<meta name="twitter:card" content="summary_large_image">

在那里替換標題、描述和圖片鏈接。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM