HTML – 如何从社交媒体缩略图中排除Jumbotron图像?

HTML – 如何从社交媒体缩略图中排除Jumbotron图像?,第1张

概述每当我的博客文章被共享时,缩略图首先自动成为jumbotron图像,而不是默认为博客文章图像: 视图 <%= image_tag "galli-walking.jpg", alt: "Conquering life and goal challenges so we can get the most out of life.", class: "main-image" %><div class= @H_404_2@ 每当我的博客文章被共享时,缩略图首先自动成为jumbotron图像,而不是默认为博客文章图像:

视图

<%= image_tag "galli-walking.jpg",alt: "Conquering life and goal challenges so we can get the most out of life.",class: "main-image" %><div >  <div >    A DAILY BLOG ABOUT MY<br>    journey & liFESTYLE  </div>  <%= render 'subscribes/subscribe.HTML.erb' %></div><%= link_to @post.Title,blog_path(@post) %><%= simple_format(@post.body,{},{:sanitize => false}) %>
解决方法 尝试将此标记添加到< head>< / head>

<Meta property="og:image" content="<%= image_path('your_image') %>" />

从share使用中排除图像的可能解决方案是使用带有CSS background-image属性的div.代替

<%= image_tag "galli-walking.jpg",class: "main-image" %>

使用

<div adsbygoogle"          data-ad-layout="in-article"     data-ad-format="fluid"     data-ad-client="ca-pub-4605373693034661"     data-ad-slot="1300602012">          总结       

以上是内存溢出为你收集整理的HTML – 如何从社交媒体缩略图中排除Jumbotron图像?全部内容,希望文章能够帮你解决HTML – 如何从社交媒体缩略图中排除Jumbotron图像?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1068718.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存