本帖最后由 拨Q 于 2023-4-11 18:57 编辑
[HTML] 纯文本查看 复制代码 <!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>生活常识类教程 - 吴老师博客</title>
<link rel="stylesheet" href="/wp-content/themes/life-1/style.css" type="text/css" />
<script type='text/javascript' src='https://apps.bdimg.com/libs/jquery/2.0.0/jquery.min.js'></script>
</head>
<body class="archive category category-shenghuo category-2">
<header class="header">
<div class="container">
<div class="logo"><a href="/" title=""><img src="/wp-content/uploads/2023/04/logo.png" ></a></div>
<div class="sitenav"><ul id="sitenav" class="sitenav"><li id="menu-item-17" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-17"><a href="xq/">心情</a>
<ul class="sub-menu">
<li id="menu-item-18" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-182923"><a href="/2022/">2022年</a></li>
</ul>
</li>
<li id="menu-item-29" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-9"><a href="/sb/">随笔</a>
</li>
<li id="menu-item-11" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-41"><a href="/jczj/">教程总结</a>
</li>
</ul></div>
<span class="sitenav-on"><i class="fa"></i></span>
<span class="sitenav-mask"></span>
</div>
</header><div class="clearfix"></div><div class="focusbox">
<style>
.text {
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.text-container.expanded .text {
-webkit-line-clamp: unset;
}
.text-container.expanded .expand-button {
display: inline-block;
}
</style>
<script>
const textContainer = document.querySelector('.text-container');
const text = document.querySelector('.text');
const expandButton = document.querySelector('.expand-button');
if (text.offsetHeight > textContainer.offsetHeight) {
expandButton.style.display = 'inline-block';
}
expandButton.addEventListener('click', () => {
textContainer.classList.toggle('expanded');
if (textContainer.classList.contains('expanded')) {
expandButton.textContent = '收起';
} else {
expandButton.textContent = '展开';
}
});
</script>
<div class="container">
<h1 class="focusbox-title">生活常识类教程</h1>
<div class="text-container">
<p class="text">
“闻春雷而动,濯春雨而发”,因形美味鲜气清,春笋被誉为“蔬中第一珍”。近日,患有十二指肠溃疡的王先生却因多日食用春笋发生呕血、晕厥。医生表示,春笋含有粗纤维难以消化,大量食用会刺激肠胃,尤其是胃病患者,容易造成消化道出血。北京中医药大学东直门医院通州院区脾胃病科主治医师茹淑瑛介绍,除春笋外,辛辣刺激、容易引发胀气、不易消化以及生冷食物等都不适宜肠胃不适人群食用。“咖啡、浓茶、酒、辣椒、韭菜等属于辛辣刺激食物,土豆、红薯、芋头、南瓜、板栗、豆浆等属于易胀气食物,年糕、粽子、汤圆等属于不易消化食物。此外,油炸食品、冰镇食品、甜点等也要少吃。”茹淑瑛解释道。“春季养胃以食养为主,也要避免冷热交替导致的胃肠型感冒。此外,保持良好情绪、养成分餐进食习惯也有益。”最后,茹淑瑛介绍几款春季养胃药膳。
</p>
<button class="expand-button">展开</button>
</div>
</div>
</div>
<section class="container">
<div class="excerpts-wrapper"><div class="excerpts">
<article class="excerpt excerpt-c3"><a href="/415.html">DIY组装电脑基础教程</a></article>
</div></div>
</section>
<footer class="footer">All Copyright Rights Reserved.Wu <a target="_blank" href="http://beian.miit.gov.cn">浙ICP备111号</a></footer>
<div style="display:none"></div>
<script type="text/javascript" src="wp-content/themes/life-1/js/main.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.fn.postLike = function() {
if ($(this).hasClass('done')) {
alert('谢谢点赞,但是你已经点过了不要再点了!');
return false;
} else {
$(this).addClass('done');
var id = $(this).data("id"),
action = $(this).data('action'),
rateHolder = $(this).children('.count');
var ajax_data = {
action: "bigfa_like",
um_id: id,
um_action: action
};
$.post("/wp-admin/admin-ajax.php", ajax_data, function(data) {
$(rateHolder).html(data);
});
return false;
}
};
$(document).on("click", ".favorite", function() {
$(this).postLike();
});
});
</script>
<script type='text/javascript' src='wp-includes/js/jquery/jquery.js'></script>
<script type='text/javascript' src='wp-includes/js/jquery/jquery-migrate.min.js'></script>
<script type='text/javascript' src='wp-content/plugins/zeno-report-comments/js/ajax.js'></script>
<script type='text/javascript' src='wp-includes/js/wp-embed.min.js'></script>
</body>
</html>
不知道咋回事,是冲突了吗,这个展开点不动,大佬帮忙看看 |