搜了好多网上的实例,总是感觉差点什么,结合前辈的经验,终于写了一个小例子,分享出来,供大家参考
ccc.jsp
<%@page import="java.sql.DriverManager"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="java.sql.*" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page isELIgnored="false" %>
<%@ page import="com.wenkong.entity.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta charset="UTF-8">
<title>公司介绍</title>
<link type="text/css" href="css/project.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>
<style type="text/css">
.hhhh{
width:100%;
height:100%;
border:10px solid #ccc;
margin-top:0;
position:relative;
background:#f1f1f1;
}
.hhhh a{
width:40px;
height:40px;
background:#000;
border:5px solid #fff;
position:absolute;
top:40%;
text-align:center;
text-decoration:none;
line-height:40px; //这个属性是调节a标签中<是否居中的,也就是垂直居中
color:#fff;
font-size:30px;
font-weight:bold;
filter:alpha(opacity:60);
opacity:0.6;
}
.hhhh a:hover{
//兼容IE
filter:alpha(opacity:90);
opacity:0.9;
}
#prev{
left:6px;
}
#next{
right:6px;
}
#text,#span1{
position:absolute;
left:0;
width:400px;
height:30px;
line-height:30px;
text-align:center;
color:#fff;
background:#000;
opacity:0.8;
margin:0;
filter:alpha(opacity:60);
opacity:0.6;
}
#text{
bottom:0;
}
#span1{
top:0;
}
#img1{
width:100%;
height:100%;
margin-left: 0;
}
</style>
</head>
<body>
<div class="right-top-right">
<script>
window.onload = function()