jQuery版公司大事记时间轴是一种使用jQuery库来创建的动态时间轴展示。时间轴通常用于展示公司的重要事件、里程碑或历史发展,以时间顺序排列,用户可以直观地看到公司在不同时间点的关键变化。
以下是一个简单的jQuery版公司大事记时间轴示例:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>公司大事记时间轴</title>
<style>
.timeline {
position: relative;
max-width: 600px;
margin: 0 auto;
}
.timeline-item {
position: relative;
margin-bottom: 50px;
}
.timeline-date {
position: absolute;
top: 0;
left: 0;
font-size: 16px;
color: #999;
}
.timeline-content {
margin-left: 100px;
padding: 20px;
border: 1px solid #ccc;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="timeline">
<div class="timeline-item">
<div class="timeline-date">2010年</div>
<div class="timeline-content">公司成立,开始探索市场。</div>
</div>
<div class="timeline-item">
<div class="timeline-date">2015年</div>
<div class="timeline-content">推出第一款产品,获得市场认可。</div>
</div>
<div class="timeline-item">
<div class="timeline-date">2020年</div>
<div class="timeline-content">公司规模扩大,进入国际市场。</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
$('.timeline-item').click(function() {
$(this).find('.timeline-content').slideToggle();
});
});
</script>
</body>
</html>
$(document).ready()
。通过以上步骤,你可以创建一个简单且功能齐全的jQuery版公司大事记时间轴。
领取专属 10元无门槛券
手把手带您无忧上云