我已经创建了自己的社交媒体图标,如下所示:
<a href="https://www.facebook.com/sharer/sharer.php?u=example.org"
target="_blank"><div
class="containercross">
<div class="cross1">
<div class="cross2"></div>
</div>
</div></a>
Css:
.cross1 {height:30px;
width: 7px; background-
color: black; margin-left:
50px;}
.cross2 {height:30px;
width: 7px; background-
color: black; margin-left:
50px;transform:ro
tate(90deg);margin-
left:0px;}
我的问题是,以上代码中的u=example.org
会在共享时显示example.org
还是我的网站名称?否则它将如何知道我的网站名称?
答案 0 :(得分:0)
Facebook使用u
参数知道要链接到的站点,然后从该站点的head
部分中存在的元数据元素(例如title
和各种opengraph {)中提取显示的信息。 {1}}个元素。
有关更多信息,请参见this CSS Tricks article。他们提供的示例包括:
meta