我正在使用AddThis分享按钮(免费卫斯理),并已通过控制面板将图标大小设置为大。然而,对于我的设计来说,图标仍然太小了。有没有办法可以把图标的大小增加到大于32x32。(示例64x64)。AddThis给我的代码如下:
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-53a456a16e356b6f" async="async"></script>
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_sharing_toolbox"></div>发布于 2015-06-23 04:52:20
不幸的是,32x32是我们支持的最大尺寸的图标。但是,我会让团队知道您对更大的尺寸感兴趣,这样它可能会在我们的代码的未来版本中可用。
发布于 2015-10-03 07:26:38
将addthis classes css添加到您自己的样式表中是可行的。您只需要确保将它们添加到一个额外的父类(如.addthis_sharing_toolbox )下,以确保您的css优先于由addthis javascript定义的css。
如果在addthis设置中选择了最大的图标(32x32px),则以下操作可将每个图标增加到40x40px:
.addthis_sharing_toolbox .at-share-tbx-element.addthis_32x32_style .at-share-btn, .addthis_sharing_toolbox .at-share-tbx-element.addthis_32x32_white_style .at-share-btn {
max-height: 40px;
max-width: 40px;
}
.addthis_sharing_toolbox .addthis_32x32_style .at4-icon, .addthis_sharing_toolbox .addthis_32x32_white_style .at4-icon, .addthis_sharing_toolbox .at-32x32 {
background-size: 40px auto !important;
height: 40px;
line-height: 40px;
width: 40px;
}当然,这对于当前的addthis脚本是有效的。如果addthis更改了脚本中的类名或html结构,则必须更新代码。
https://stackoverflow.com/questions/30988060
复制相似问题