创建社交媒体图标

时间:2020-09-04 10:59:58

标签: html css

我已经创建了自己的社交媒体图标,如下所示:

<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还是我的网站名称?否则它将如何知道我的网站名称?

1 个答案:

答案 0 :(得分:0)

Facebook使用u参数知道要链接到的站点,然后从该站点的head部分中存在的元数据元素(例如title和各种opengraph {)中提取显示的信息。 {1}}个元素。

有关更多信息,请参见this CSS Tricks article。他们提供的示例包括:

meta