Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aleksandrkuzminv/84d9a7502e1da63ff907399b807f0567 to your computer and use it in GitHub Desktop.
Save aleksandrkuzminv/84d9a7502e1da63ff907399b807f0567 to your computer and use it in GitHub Desktop.
/*Вставляем в теле сайта*/
<body>
<a class="btn_telegram_share" href="https://telegram.me/share/url?url=ВАШ_URL&text=ТЕКСТ">Поделиться</a>
</body>
</html>
/*Вставляем CSS стиль*/
.btn_telegram_share {
display: inline-block;
text-align: center;
vertical-align: middle;
margin-right: 7px;
padding: 3px 10px;
border: 1px solid #54aaeb;
border-radius: 50px;
background: #54aaeb;
background: -webkit-gradient(linear, left top, left bottom, from(#54aaeb), to(#54aaeb));
background: -moz-linear-gradient(top, #54aaeb, #54aaeb);
background: linear-gradient(to bottom, #54aaeb, #54aaeb);
font: normal normal normal 16px arial;
color: #ffffff;
text-decoration: none;
}
/*.btn_telegram_share:focus*/
.btn_telegram_share:hover
{
border: 1px solid #61c4ff;
background: #65ccff;
background: -webkit-gradient(linear, left top, left bottom, from(#65ccff), to(#65ccff));
background: -moz-linear-gradient(top, #65ccff, #65ccff);
background: linear-gradient(to bottom, #65ccff, #65ccff);
color: #ffffff;
text-decoration: none;
}
.btn_telegram_share:active {
background: #32668d;
background: -webkit-gradient(linear, left top, left bottom, from(#32668d), to(#54aaeb));
background: -moz-linear-gradient(top, #32668d, #54aaeb);
background: linear-gradient(to bottom, #32668d, #54aaeb);
}
.btn_telegram_share:before{
content: "\0000a0";
display: inline-block;
height: 24px;
width: 24px;
line-height: 24px;
margin: 0 4px -6px -4px;
position: relative;
top: 0px;
left: 0px;
background: url("http://Втавляем ссылку на свою картинку.png") no-repeat left center transparent;
background-size: 100% 100%;
}
@Mitya-Shepelev
Copy link

Спасибо, помог!

@aleksandrkuzminv
Copy link
Author

Пожалуйста!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment