简体   繁体   English

社交媒体图标之间的间距

[英]spacing between social media icons

I have a design as shown below which I am trying to replicate in my domain 我有一个如下所示的设计,正在尝试在自己的域中复制

在此处输入图片说明

The above design which I have referenced is not a full-design. 我引用的上述设计不是完整设计。 We have to scroll down towards the bottom to see that section in the domain . 我们必须向下滚动到底部才能看到域中的该部分。 I am able to accomplish 80% in that design. 我能够完成80%的设计。 The rest 20% which I am not able to complete is the spacing between social media icons which I am trying to replicate in my domain. 我无法完成的其余20%是我要在自己的域中复制的社交媒体图标之间的间距。

In the domain, there is no spacing between social media icons. 在域中,社交媒体图标之间没有间距。 I am wondering how I can increase the spacing between every social media icons so that it looks similar to the above design.

Note: I have marked arrow in the above design in order for the viewers to get the exact idea what I want to accomplish. 注意:在上面的设计中,我已经标记了箭头,以便观众了解我想要完成的工作。 Those arrows will not come in the design and its signifies spacing between social media icons. 这些箭头不会出现在设计中,它表示社交媒体图标之间的间距。

I tried playing with the CSS code in the inspect section but I was unable to replicate the above design. 我尝试在inspect部分中使用CSS代码,但无法复制上述设计。

The HTML and JS code which I have used to get the social media icons on my webpage is: 我用来在网页上获取社交媒体图标的HTML和JS代码是:

    <div style="display:inline-block;vertical-align:top">
        <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.awardwinnersonly.com" data-text="Czech out the books, movies, and music that won major awards" data-via="BClayShannon">Tweet</a>
        <script>
            ! function(d, s, id) {
                var js, fjs = d.getElementsByTagName(s)[0],
                    p = /^http:/.test(d.location) ? 'http' : 'https';
                if (!d.getElementById(id)) {
                    js = d.createElement(s);
                    js.id = id;
                    js.src = p + '://platform.twitter.com/widgets.js';
                    fjs.parentNode.insertBefore(js, fjs);
                }
            }(document, 'script', 'twitter-wjs');

        </script>
    </div>
    <div style="display:inline-block;vertical-align:top" class="fb-like" data-href="http://www.awardwinnersonly.com" data-send="false" data-width="450" data-show-faces="false" data-font="segoe ui">
    </div>
    <iframe src="https://www.facebook.com/plugins/share_button.php?href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fplugins%2F&layout=button&size=small&mobile_iframe=true&width=59&height=20&appId" width="59" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>

    <script src="https://apis.google.com/js/platform.js" async defer></script>
    <g:plus action="share" href="https://www.example.com"></g:plus>


    <script src="//platform.linkedin.com/in.js" type="text/javascript">
        lang: en_US

    </script>
    <script type="IN/Share"></script>

You could add margin to each social-media button like: 您可以为每个社交媒体按钮添加边距,例如:

    margin-right: 1em;

For example the first twitter button like: 例如第一个Twitter按钮,例如:

display:inline-block;vertical-align:top;margin-right: 3em;padding-left: 15%;

You better do it with some class so you don't repeat same "inline" style all over. 您最好在某个class这样做,以免重复出现相同的“内联”样式。

As a side note I would also suggest to wrap the whole "middle" content in one <div class="main-content"> (just example) positioning the whole content. 附带说明一下,我还建议将整个“中间”内容包装在放置整个内容的一个<div class="main-content"> (仅作为示例)中。 Instead of setting padding-left: 15%; 而不是设置padding-left: 15%; to every content element. 到每个内容元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM