会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132443个问题
JAVA 全系列/第二阶段:JAVA 基础深化和提高/IO 流技术(旧) 19171楼
JAVA 全系列/第八阶段:Linux入门到实战/Linux(旧) 19174楼
Python 全系列/第十七阶段:数据分析-数学知识(旧)/补充数学知识 19175楼
Python 全系列/第十一阶段:重量级Web框架-Django/Redis的入门与应用(拓展) 19176楼
JAVA 全系列/第八阶段:Linux入门到实战/Maven 19178楼

内联式可以不用加type=text?css吗?

但是我下面的这样也是可以运行的欸,用的还比较多

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <title>Title</title>

</head>

<style type="text/css">

    *{

        margin: 0;

        padding: 0;

        text-decoration: none;

        box-sizing: border-box;

    }

    body{

        min-height: 100vh;

        background-color: skyblue;

    }

    .login-box{

        width: 360px;

        background: #fff;

        height: 580px;

        padding: 80px 40px;

        border-radius: 10px;

        position: absolute;

        left: 50%;

        top:50%;

        transform: translate(-50%,-50%);

    }

    .login-box h1{

        text-align: center;

        margin-bottom: 60px;


    }

    .txtb{

        position: relative;

        margin: 30px 0;

    }

    .txtb input{

        width: 280px;

        height: 50px;

        border: 1px solid #bbb;

        border-radius: 5%;

    }

    .txtb select{

        width: 200px;

        height: 25px;

        border: 1px solid #bbb;

        border-radius: 5%;

    }

    .logbtn{

        display: block;

        width: 100%;

        height: 50px;

        border: none;

        font-size: 20px;

        background-size: 200%;

        background-color: #ff6300;

        outline: none;

        cursor: pointer;

        transition: .5s;

    }

    .logbtn:hover{

        background-position: right;

    }

    .bottom-text{

        margin-top: 60px;

        text-align: center;

        font-size: 13px;

       

    }


</style>

<body>

<form action="LoginServlet" method="post" class="login-box" >

    <h1>宿舍管理系统</h1>

    <div class="txtb">

        <input type="text" name="username"><br/>

    </div>

    <div class="txtb">

        <input type="password" name="password"><br/>

    </div>

    <div class="txtb">

        <p>你选择登录的身份是?</p>

        <select>

            <option>学生</option>

            <option>老师</option>

            <option>宿舍管理员</option>

        </select>

    </div>

    <input type="submit" class="logbtn" value="提交">


    <div class="bottom-text">


    </div>


</form>

</body>

</html>



WEB前端全系列/第一阶段:HTML5+CSS3模块/初识CSS 19179楼

package com.bjsxt.ObjectLiu;

import java.io.*;

public class TestStudent {
    public static void main(String[] args) {
          //write();//调用写对象的方法
        read();//调用读对象的方法
    }
    public static void write(){
        ObjectOutputStream oos= null;
        try {
            //oos = null;
            oos=new ObjectOutputStream(new FileOutputStream("E:\\student.txt"));
            Student stu=new Student("marry",20,"888888");
            Student.schoolName="JN校区";
            oos.writeObject(stu);
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            //关闭
            if (oos!=null){
                try {
                    oos.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
    public static void read(){
        ObjectInputStream ois= null;
        try {
            ois = null;
            ois=new ObjectInputStream(new FileInputStream("E:\\student.txt"));
            Student stu = (Student) ois.readObject();
            System.out.println(stu);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }finally {
            //关闭流
            if(ois!=null){
                try {
                    ois.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
//打印结果:Student{name='marry', age=20, pwd='null'}schoolName=null
//杜老师,为什么我的打印结果含有单引号,而讲课的老师的打印结果是没有单引号的,麻烦您帮忙看一下,谢谢您


JAVA 全系列/第二阶段:JAVA 基础深化和提高/IO 流技术(旧) 19181楼

老师我这里有一个疑问前台显示页面是8082端口,当搜索时发送的请求时http://localhost:8083/search.html?q=%E6%89%8B%E6%9C%BA

是发送到8083端口,那8083这个项目的controller不应该加上@crossorigin么?为什么8083的项目的controoler

不加@crossorigin也能访问到?

JAVA 全系列/第十八阶段:亿级高并发电商项目_架构/编码(旧)/电商:使用Solr实现数据搜索 19183楼

servletdemo.rar

不知道为什么报错,报错后控制台还响应出结果为什么


JAVA 全系列/第五阶段:JavaWeb开发/Servlet技术详解 19184楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637