|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
|
pageEncoding="UTF-8"%>
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
<title></title>
|
|
|
<!-- 引入Bootstrap CSS -->
|
|
|
<link href="../css/bootstrap.min.css" rel="stylesheet">
|
|
|
<!-- 引入jQuery(Bootstrap的JavaScript插件依赖于jQuery) -->
|
|
|
<script src="../js/jquery.min.js"></script>
|
|
|
<!-- 引入Bootstrap JavaScript -->
|
|
|
<script src="../js/bootstrap.min.js"></script>
|
|
|
|
|
|
<style>
|
|
|
/* 轮播图图片样式 */
|
|
|
.showCarousel .carousel-inner > .item > img {
|
|
|
display: block;
|
|
|
width:100%;
|
|
|
height:620px;
|
|
|
}
|
|
|
/* 轮播图顶部间距 */
|
|
|
.showCarousel{
|
|
|
margin-top:2%;
|
|
|
}
|
|
|
/* 字体样式 */
|
|
|
font{
|
|
|
font-size:40px;
|
|
|
color:black;
|
|
|
font-family:YouYuan;
|
|
|
font-weight:900;
|
|
|
}
|
|
|
/* 轮播图文字描述底部间距 */
|
|
|
.carousel-caption{
|
|
|
margin-bottom:10%;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<%
|
|
|
// 检查会话属性 'reader' 和 'reader_first' 是否不为空且 'reader_first' 等于 "1"
|
|
|
if(session.getAttribute("reader") != null && session.getAttribute("reader_first") != null && session.getAttribute("reader_first").equals("1")){
|
|
|
// 将 'reader_first' 设置为 "2",表示用户已经访问过
|
|
|
session.setAttribute("reader_first", "2");
|
|
|
// 可选地,可以在会话中保留 reader 属性
|
|
|
// session.setAttribute("reader", session.getAttribute("reader"));
|
|
|
}
|
|
|
%>
|
|
|
|
|
|
<!-- 轮播组件 -->
|
|
|
<div id="carousel-example-generic" class="carousel slide showCarousel" data-ride="carousel" data-interval="2000" style="width:96%;margin-left:2%;">
|
|
|
<!-- 指示器 -->
|
|
|
<ol class="carousel-indicators">
|
|
|
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
|
|
|
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
|
|
|
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
|
|
|
</ol>
|
|
|
|
|
|
<!-- 轮播内容 -->
|
|
|
<div class="carousel-inner" role="listbox">
|
|
|
<div class="item active">
|
|
|
<img src="path/to/image1.jpg" alt="..."> <!-- 在这里添加你的图片路径 -->
|
|
|
<div class="carousel-caption">
|
|
|
<font style="color:white;">唯有知识永不负你!</font>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
<img src="path/to/image2.jpg" alt="..."> <!-- 在这里添加你的图片路径 -->
|
|
|
<div class="carousel-caption">
|
|
|
<font style="color:white;">学海无涯,书韵悠扬</font>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item">
|
|
|
<img src="path/to/image3.jpg" alt="..."> <!-- 在这里添加你的图片路径 -->
|
|
|
<div class="carousel-caption">
|
|
|
<font style="color:white;">图一份神闲气静,书几笔悦目赏心</font>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 控制按钮 -->
|
|
|
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
|
|
|
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
|
|
<span class="sr-only">Previous</span>
|
|
|
</a>
|
|
|
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
|
|
|
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
|
|
<span class="sr-only">Next</span>
|
|
|
</a>
|
|
|
</div>
|
|
|
</body>
|
|
|
</html>
|