老师,您好,请问按钮样式怎么加载不出来呢?我写的有问题?
按钮css:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #button{ float:right; } #button button{ width:80px; height:30px; color:white; background-color:#428BCA; border:1px solid #428BCA; border-left:2px solid white; border-top:2px solid white; border-radius:5px; font-weight:bold; cursor:pointer; box-shadow:5px 5px 12px #ccc; } |
jsp代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | <section class = "main" > <div class = "container" > <c:forEach items= "${messages}" var= "msg" > <div class = "alt-item" > <div class = "alt-head" > <div class = "alt-info" > <span>作者:<a href= "" >${msg.username}</a></span> <span>时间:<fmt:formatDate pattern= "yyyy-MM-dd HH:mm:ss" value= "${msg.createTime}" /></span> </div> </div> <div class = "alt-content" > <h3>${msg.title}</h3> <p>${msg.content}</p> </div> <div id= "button" > <a href= "" > <button>修改</button> </a> <a href= "" > <button>删除</button> </a> </div> </div> </c:forEach> </div> </section> |
我只是在老师给的代码基础上,在jsp中这么做了,css文件最后添加了,怎么加载不出效果呢?
13
收起
正在回答
2回答
button标签和#button是两回事吧,一个事标签,一个是ID选择器
Java数据库开发与实战应用2018版
- 参与学习 人
- 提交作业 277 份
- 解答问题 4297 个
Java数据库开发的必备技能,从流行的MySQL数据库开始,到Java原生的数据库管理接口JDBC的使用,再到常用的数据持久化框架MyBatis,让你向Java工程师的目标又迈进了一步!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧