ElasticSearch 6.x 学习笔记:37.新闻搜索之页面设计




1、搜索页面

(1)JSP页面

<%--
  Created by IntelliJ IDEA.
  User: Chengyuqiang
  Date: 2018/2/25 0025
  Time: 17:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>ES搜索</title>
    <link type="text/css" rel="stylesheet" href="css/index.css">
</head>
<body>
<div class="main">
    <h1>ES搜索</h1>
    <div class="box">
        <form name="form1" action="/search.do" method="post">
            <input type="search" name="query">
            <input type="submit" value="ES一下">
        </form>
    </div>
</div>
</body>
</html>

  
  
  • 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

(2)css文件

body{
    margin: 0 auto;
}
.main{
    border: 1px solid #cccccc;
    width:600px;
    height: 400px;
    margin: 100px auto;
}
.main h1{
    text-align: center;
    color: chartreuse;
    margin: 50px auto;
}
.box{
    width:80%;
    height: 30px;
    border: 1px solid chartreuse;
    margin: 50px auto;
}
.box input[type="search"]{
    height: 30px;
    width: 85%;
    outline: none;
    border :0;
    font-size: 18px;
}
.box input[type="submit"]{
    height: 30px;
    width: 14%;
    outline: none;
    border :0;
    background-color: chartreuse;
    color: white;
}
  
  
  • 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
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35

(3)页面效果
这里写图片描述

2、分页页面






1、搜索页面

猜你喜欢

转载自blog.csdn.net/u011428598/article/details/81082297