input边框的阴影怎么写?

input边框的阴影怎么写?

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style>
*{
	padding: 0px;
	margin: 0px;
}
.container{
	position:relative;
	height:350px;
    width:500px;
    top:100px;
    /* border: 1.5px solid blue; */
    margin:0px auto;
}
.container #container1{
	position:relative;
	height:30px;
    width:75px;
    /* border: 1px solid red; */
    margin:0px auto;
    top:10px;
    /* font-style:italic; */
    font-weight:bold;
    font-family:monospace;
    font-size:18px;
}
.container #form-horizontal{
	/* position:relative; */
	height:200px;
    width:260px;
    /* border: 1px solid green; */
    margin:0px auto;
    
}
/* .container #form-horizontal ul li{
	position:relative;
	margin:0px auto;
	list-style:none;
	float:left;
} */
.container #form-horizontal{
	position:relative;
	top:5px;
	margin:0px auto;
	list-style:none;
}
.container #form-horizontal input{
	/* box-shadow:0px 0px 0px 0px rgba(0,0,0,0); */
}
.container #form-horizontal #input1{
	position:relative;
	left:2px;
}
.container .button1{
	position:relative;
	height:35px;
    width:55px; 
    top:5px;
    /* border: 1px solid red; */
    margin:0px auto;	
}
.container .button1 .btn{
	width:55px; 
} 
</style>
</head>
<body>
	<div class="container">
		<div id="container1">课程添加</div>
		<form id="form-horizontal" class="form-horizontal" action="/book_management/AddBookServlet" method="post">
<!-- 			<ul>
				<li><div>课程名  </div></li>
				<li><input type="text" value="" name="" id="" class=""></li>
				<li><div>所属方向</div></li>
				<li><input type="text" value="" name="" id="" class=""></li>
				<li><div>课程描述</div></li>
				<li><input type="text" value="" name="" id="" class=""></li>						
			</ul> -->
			<label>课程名  </label>&nbsp;&nbsp;
			<input type="text" value="" name="" id="input1" class=""><br>
			<label>所属方向</label>
			<input type="text" value="" name="" id="" class=""><br>
			<label>课程描述</label>
			<input type="text" value="" name="" id="" class=""><br>
			<div class="button button1"><button type="submit" class="btn btn-primary">添加</button></div>
			
		</form>		
	</div>

</body>
</html>

http://img1.sycdn.imooc.com//climg/5ea79cad094edfcb03200263.jpg

这里为什么出现一个错误?但是不影响运行。

http://img1.sycdn.imooc.com//climg/5ea79d0e09aaa4f311970403.jpg

input边框的阴影怎么写?

添加按钮的样式怎么能写成题目里要求的那样?

课程名、所属方向、课程描述 后面的文本框怎么对齐?

还有字体怎么设置成题目里要求的那样?

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学你好,

1、复制同学代码,并没有出现错误。

http://img1.sycdn.imooc.com//climg/5ea7d4ac09f73e0403750136.jpg

建议同学查看一下是否保存了文件

2、这里并没有给input边框设置阴影,若同学想设置可以参考如下代码:

input {
	border:1px solid balck;
	
    -webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6);
    box-shadow:inset 0px 1px 1px grey(0,0,0,0.075), 0px 0px 8px rgba(102,175,233,0.6);

}

3、给按钮设置如下样式即可:

style="border-radius: 7px;border-color: blue"

3、在同学的代码实现中,已经对齐了哦

4、字体并没有硬性要求,这里同学可以给“课程添加”加粗即可。

祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师