自定义URL的自定义Pinterest按钮(文本链接,图像或两者) [英] Custom Pinterest button for custom URL (Text-Link, Image, or Both)

查看:154
本文介绍了自定义URL的自定义Pinterest按钮(文本链接,图像或两者)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找到解决方案,但不能。我需要一个自定义图像的Pinterest(Pin It)按钮,并固定一些自定义图像的网址,但不是当前页面。



我创建了一个自定义链接:

 < a href =http://pinterest.com/pin/create/button/?url=http://inspired-ui .com& media = {ImageURL}& description = DescriptionTextclass =pinitbutton> Pin It< / a> 

在样式设置背景图片,但我只看到默认Pin It按钮,而不是我的自定义按钮



有一些解决方案,您可以为Pin It按钮设置自定义按钮图像,但我不能在这些解决方案中更改media = {ImageURL}。



流行的解决方案是

 < a href ='javascript:void ()%7Bvar%20e = document.createElement(&'script&'); e.setAttribute(&'type&',&'text / javascript&'); e.setAttribute &'charset&',&'UTF-8&'); e.setAttribute(&'s src&'; http://assets.pinterest.com/js/ pinmarklet.js?r =&'+ Math.random()* 99999999); document.body.appendChild(e)%7D)());'>< img src ='http: brandaiddesignco.com/blog/PinIt.png'/> ;</a> 

但它不能帮助我。是否有人知道解决方案?

解决方案

确实是Jeremy Mansfield www.brandaiddesignco.com 有一个伟大的



我已经以三个例子的形式

http://jsfiddle.net/hUAh8/1/\">jsFiddle Text-Link方法

参考: jsFiddle自定义徽标方法

参考: jsFiddle自定义徽标和图片方法



有关 Pinterest信息的更多信息,请参阅我的其他 SO答案


I tried to find the solution but can't. I need a custom image for Pinterest (Pin It) button and pin some custom image by url but not a current page.

I created a custom link:

<a href="http://pinterest.com/pin/create/button/?url=http://inspired-ui.com&media={ImageURL}&description=DescriptionText" class="pinitbutton">Pin It</a>

in style I set the background image but I see only default Pin It button and not my custom button

There are some solutions where you can set custom button image for Pin It button but I can't change the media={ImageURL} in those solutions.

The popular solution is

<a href='javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;http://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)%7D)());'><img src='http://www.brandaiddesignco.com/blog/PinIt.png'/></a>

But it doesn't help me. Does any one know the solution?

解决方案

Indeed the popular solution by Jeremy Mansfield at www.brandaiddesignco.com has a great method to customize the Pinterest button any way you want!

I've made three examples, in the form of jsFiddle's, so you can see how it's done using that method.

Reference: jsFiddle Text-Link method
Reference: jsFiddle Custom Logo method
Reference: jsFiddle Custom Logo and Image method

For more Pinterest Info, see my other SO Answer.

这篇关于自定义URL的自定义Pinterest按钮(文本链接,图像或两者)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆