我试图找到解决方案,但不能.我需要Pinterest(Pin It)按钮的自定义图像,并通过URL固定一些自定义图像,但不是当前页面.
我创建了一个自定义链接:
<a href="http://pinterest.com/pin/create/button/?url=http://inspired-ui.com&media={ImageURL}&description=DescriptionText" class="pinitbutton">Pin It</a>
Run Code Online (Sandbox Code Playgroud)
在风格我设置背景图像,但我只看到默认的Pin It按钮,而不是我的自定义按钮
在某些解决方案中,您可以为Pin It按钮设置自定义按钮图像,但我无法在这些解决方案中更改media = {ImageURL}.
流行的解决方案是
<a href='javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','http://assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)%7D)());'><img src='http://www.brandaiddesignco.com/blog/PinIt.png'/></a>
Run Code Online (Sandbox Code Playgroud)
但它对我没有帮助.有人知道解决方案吗?