2

我需要 Skype 联系我按钮的帮助。

使用标准Skype按钮,margin: 24px; vertical-align: -30px; 所以我试图删除边距和垂直对齐,但没有任何效果。

添加代码片段:

Skype.ui({
  "name": "chat",
  "element": "SkypeButton_Call_Sandrita.logistics_1",
  "participants": ["Sandrita.logistics"],
  "imageSize": 24
});
#SkypeButton_Call_Sandrita.logistics_1_paraElement {
  margin: 0;
}
#SkypeButton_Call_Sandrita.logistics_1_paraElement img {
  margin: 0 !important;
  vertical-align: middle !important;
}
<script type="text/javascript" src="https://secure.skypeassets.com/i/scom/js/skype-uri.js"></script>

<header>
  <div class="container">
    <div id="SkypeButton_Call_Sandrita.logistics_1"></div>
  </div>
</header>

感谢您的任何帮助!

4

3 回答 3

2

您需要转义您正在使用的点id(注意.用于引用类) - 请参见下面的演示:

Skype.ui({
  "name": "chat",
  "element": "SkypeButton_Call_Sandrita.logistics_1",
  "participants": ["Sandrita.logistics"],
  "imageSize": 24
});
#SkypeButton_Call_Sandrita\.logistics_1_paraElement {
  margin: 0;
}
#SkypeButton_Call_Sandrita\.logistics_1_paraElement img {
  margin: 0 !important;
  vertical-align: middle !important;
}
<script type="text/javascript" src="https://secure.skypeassets.com/i/scom/js/skype-uri.js"></script>

<header>
  <div class="container">
    <div id="SkypeButton_Call_Sandrita.logistics_1"></div>
  </div>
</header>

于 2016-12-21T15:29:52.443 回答
1

选择器不起作用,因为它包含一个点“。”

Skype.ui({
           "name": "chat",
           "element": "SkypeButton_Call_Sandrita",
           "participants": ["Sandrita.logistics"],
           "imageSize": 24
         });
#SkypeButton_Call_Sandrita div {
  margin:0;
}
#SkypeButton_Call_Sandrita img {
  margin:0 !important;
  vertical-align:middle !important;
}
<script type="text/javascript" src="https://secure.skypeassets.com/i/scom/js/skype-uri.js"></script>

<header>
  <div class="container">
    <div id="SkypeButton_Call_Sandrita"> </div>
  </div>
</header>

于 2016-12-21T15:31:14.600 回答
1

从您的 id 中删除点#SkypeButton_Call_Sandrita_logistics_1

Skype.ui({
  "name": "chat",
  "element": "SkypeButton_Call_Sandrita_logistics_1",
  "participants": ["Sandrita.logistics"],
  "imageSize": 24
});
<script type="text/javascript" src="https://secure.skypeassets.com/i/scom/js/skype-uri.js"></script>

<style>
  #SkypeButton_Call_Sandrita_logistics_1_paraElement {
    margin: 0;
  }
  #SkypeButton_Call_Sandrita_logistics_1_paraElement img {
    margin: 0px !important;
    vertical-align: middle !important;
  }
</style>

<header>
  <div class="container">
    <div id="SkypeButton_Call_Sandrita_logistics_1"></div>
  </div>
</header>

于 2016-12-21T15:32:23.070 回答