丑陋的动态谷歌图标 - 任何补救措施? [英] Ugly dynamic google icons - any remedy?

查看:101
本文介绍了丑陋的动态谷歌图标 - 任何补救措施?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为GM API v3制作自定义图标(我希望数字为1-20,所有的针脚大小相同),并且我发现)



您会发现1和11没有很好地居中!任何想法?



如此漂亮的API和如此丑陋的图标!



PS:请注意,此API现在已被弃用,并且找不到补救措施

解决方案

一些尺寸的组合比较好,但看起来右边总是有一个像素。



或者可能是一个绝望的黑客,如:

 < style> 
.pin {
background:url(http://chart.googleapis.com/chart?chst = d_map_spin& chld = 0.65 | 0 | FF8800 | 14 | _ |)no-repeat 50%50 %;
width:29px;
height:44px;
text-align:center;
float:left;
padding-top:6px
}
< / style>

...

< div class =pin> 1< / div>
< div class =pin> 2< / div>
< div class =pin> 3< / div>
< div class =pin> 4< / div>
< div class =pin> 5< / div>
< div class =pin> 11< / div>

...


I'm trying to make custom icons for GM API v3 (I want numbers 1-20, all pins same size) and I found Dynamic icons in Google Charts:

( http://chart.googleapis.com/chart?chst=d_map_spin&chld=0.65|0|FF8800|14|_|1 )

You see that "1" and "11" are not centered nicely! Any thoughts?

So nice API and so ugly icons!


PS: note that this API is now deprecated, and no remedy has been found.

解决方案

Some combination of sizes are better, but it looks there is always one pixel too much on the right.

Or may be a desperate hack like:

<style>
    .pin{
        background:url(http://chart.googleapis.com/chart?chst=d_map_spin&chld=0.65|0|FF8800|14|_|) no-repeat 50% 50%;
        width:29px;
        height:44px;
        text-align:center;
        float:left;
        padding-top:6px
    }
</style>

    ...

<div class="pin">1</div>
<div class="pin">2</div>
<div class="pin">3</div>
<div class="pin">4</div>
<div class="pin">5</div>
<div class="pin">11</div>

    ...

这篇关于丑陋的动态谷歌图标 - 任何补救措施?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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