简单的javaweb项目

图书管理系统

效果图:
在这里插入图片描述
在这里插入图片描述
实现对图书的增删查改

建立数据库表:
在这里插入图片描述
添加数据:
在这里插入图片描述
连接mysql需要导入相应的包:
在这里插入图片描述
连接数据库的代码:

Class.forName("com.mysql.cj.jdbc.Driver");
			String url="jdbc:mysql://localhost:3306/数据库名?
			String username="root";
			String password="123456";
			Connection con=DriverManager.getConnection(url,username,password);
			Statement st=con.createStatement();
			String sql="select * from tb_book";
			ResultSet rs=st.executeQuery(sql);

通过修改SQL语句使用servlet实现对数据的删改查询和页面跳转

页面美化(立体动态导航栏):

.box{
width: 600px;
height: 50px;
background:#F1F1EF;
margin: 50px 0 500px 0; 
border-radius:10px;
box-shadow: 0 5px 2px #D8D9D1;<%--阴影 --%>
}
.box ul{
height: 100%;
padding: 0 5%;
list-style: none;<%-- --%>
color: #fff;
display: flex;<%--行内容器模式 --%>
justify-content: space-around;<%--每个项目两侧间隔相等 --%>
font:bold 16px/50px Arial;
}
.box ul li{
height: 100%;
width: 100px;
display: flex;            
align-items: center;
justify-content: center;
text-shadow:2px 2px 4px rgba(0,0,0,.5);<%--字体阴影 --%>
background: linear-gradient(#D8D9D1) no-repeat right/1px 15px;
}
.box ul li a{
text-decoration: none;
color: #fff;
}
.box ul li a:hover{
transform: rotate(10deg);<%--旋转角度 度数单位deg --%>
}

转自:https://blog.csdn.net/coolpail/article/details/82501442

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值