Html 添加此按钮
我正在为照片库开发一个基本的HTML网站,我想添加AddThis按钮,但它们不会显示出来 我正在使用以下代码:Html 添加此按钮,html,addthis,Html,Addthis,我正在为照片库开发一个基本的HTML网站,我想添加AddThis按钮,但它们不会显示出来 我正在使用以下代码: <!-- AddThis Button BEGIN --> <div class="addthis_toolbox addthis_default_style "> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferre
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
<a class="addthis_counter addthis_bubble_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52adbb04690060bb"></script>
<!-- AddThis Button END -->
有人知道出了什么问题吗?我也有同样的问题。我直接从file:///home/emmanuel/html/new.html
而不是通过web服务器。将html文件放在apache服务器目录中(ubuntu中的/var/www)并在http://127.0.0.1/new.html
为我解决了这个问题。希望这有帮助
new.html
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_tweet"></a>
<a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal"></a>
<a class="addthis_counter addthis_pill_style"></a>
</div>
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-52b7262c326d06b2"></script>
<!-- AddThis Button END -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
var addthis_config={“数据轨道地址栏”:true};
window.jQuery | | document.write(“”)
(函数(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]| |(b[l]=
函数(){(b[l].q=b[l].q | |[]).push(参数)});b[l].l=+新日期;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e、 src='//www.google-analytics.com/analytics.js';
r、 parentNode.insertBefore(e,r)}(窗口,文档,'script','ga');
ga(“创建”,“UA-XXXXX-X”);ga('send','pageview');
我将您的代码复制并粘贴到JSFIDLE中,它对我起了作用。这太奇怪了。谢谢你的努力。