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

2022-05-06 19:25:50 浏览数 (1)

1、搜索页面

(1)JSP页面

代码语言:javascript复制
<%--
  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>

(2)css文件

代码语言:javascript复制
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;
}

(3)页面效果

0 人点赞