酒店布局
代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/jiudian.css"/>
</head>
<body>
<div class="box">
<div class="header">
<p>
<span>
<img src="img/imgs/phone.png">
400-808-8682
</span>
<a href="">请登录</a>|
<a href="">注册</a>
</p>
</div>
</div>
<div class="nav w1200">
<img src="img/imgs/logo.png">
<p>
<a href="">首页</a>
<a href="">目的地</a>
<a href="">亲子游学</a>
<a href="">酒店预订</a>
<a href="">车辆接送</a>
<a href="">签证代办</a>
<a href="">精彩瞬间</a>
</p>
</div>
<div class="mainwrap">
<div class="main w1200">
<div class="bread">
<a href="">首页</a>
<a href="">酒店预订</a>
<a href="">曼谷悦榕庄酒店(酒店名称)</a>
</div>
</div>
<div class="big">
<h2>曼谷悦榕庄酒店(酒店名称)</h2>
<div class="xiao">
<img src="img/imgs/7_14.jpg">
</div>
<div class="si">
<img src="img/imgs/s1.jpg"/>
<img src="img/imgs/s2.jpg"/>
<img src="img/imgs/s3.jpg"/>
<img src="img/imgs/s4.jpg"/>
</div>
</div>
</div>
</body>
</html>
CSS样式
*{
padding: 0;
margin: 0;
}
li,ul,ol{
list-style: none;
}
a{
text-decoration: none;
}
/*header样式*/
.box{
background-color: #333333;
}
.header{
/* width: 1200px;*/
height: 45px;
/* margin: 0 auto;*/
}
.header p{
float: right;
color: #FFFFFF;
font-size: 14px;
line-height:42px ;
}
.header img{
margin-top: 11px;
float: left;
margin-right: 12px;
/*vertical-align:top ;*/
}
.header span{
font-size: 20px;
margin-right: 24px;
}
.header a{
color: #FFFFFF;
font-size: 14px;
margin: 0 16px;
}
/*nav*/
/*.nav,.header{
width: 1200px;
margin: 0 auto;
}*/
.nav{
margin: 1200px;
height: 80px;
margin: 0 auto;
}
.nav p{
float: right;
line-height: 80px;
}
.nav a{
width: 100px;
text-align: center;
float: left;
height: 76px;
font-size: 20px;
margin-right: 20px;
color: #000000;
}
.nav a:last-child{
margin-right: 0;
}
.nav a:hover{
border-bottom: 4px solid #e8420a;
}
.mainwrap{
height:900px ;
background-color: #d3d3d3d3;
}
.bread{
line-height: 100px;
}
.bread a+a:before{
content: ">";
margin-left: 10px;
}
/*.bread a:last-child:after{
content: "";
}*/
.big{
width:1200px ;
height: 555px;
background-color: azure;
margin: 0 auto;
}
.xiao{
width: 670px;
height: 430px;
float: left;
margin: 6px;
margin-bottom: 4px;
background-color: antiquewhite;
}
.si{
width: 680px;
height: 110px;
background-color: burlywood;
layout-flow: horizontal;
float: left;
bottom: 0px;
margin-left: 4px;
}
.big h2{
float: right;
}
JSP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>javascript</title>
<script>
// var flag = true;
// console.log(typeof flag);
// var u;
// console.log(u);
// console.log(typeof u);
// var score = 93;
// 求这是一年中的第几天?
var year = 2019,
mon = 9,
day = 9,
sum = 0;//定义变量
switch(true){
case mon>11:
sum += 30;//sum=sum+30,
case mon>10:
sum += 31;
case mon>9:
sum += 30;
case mon>8:
sum += 31;//每次条件满足需要累加0+31
case mon>7:
sum += 31;//31+31
case mon>6:
sum += 30;//上面的和加30
case mon>5:
sum += 31;//以此类推
case mon>4:
sum += 30;
case mon>3:
sum += 31;
case mon>2:
sum += ((year%4==0&&year%100!==0)||year%400==0)?29:28
//需要判断2月份有多少天,判断年份是否是闰年
// if((year%4==0&&year%100!==0)||year%400==0){
// sum += 29;
// }else{
// sum += 28;
// }
case mon>1:
sum += 31;
default:
sum += day;
}
console.log(sum);//打印出来,也就是得出结果
// 短路操作
90>60&&console.log('及格');
console.log(10<5&&100);
// switch(true){
// case score>=90:
// console.log('优');
// break;
// case score>=80:
// console.log('良');
// break;
// default :
// console.log('不及格');
// }
// if(score>=90){
// console.log('优');
// }
// 逻辑运算符
// if(score>=80&&score<90){
// console.log('优');
// }
// if(score>=90){
// console.log('优');
// }else if(score>=80){
// console.log('良');
// }else if(score>70){
// console.log('中');
// }else if(score>=60){
// console.log('及格');
// }else{
// console.log('不及格');
// }
// 循环语句
var row = 3,
col = 5;
document.write('<table width="100" border="1">');
//直接在网页中输出内容
for(var i=0;i<row;i++){
//循环语句 (定义一个量,判断语句,自增)
document.write('<tr>');
for(var j=0;j<col;j++){
document.write('<td>'+j+'</td>');
}//二次循环
document.write('</tr>');
}
document.write('</table>');
document.write('<table width="100" border="1">');
for(var i=1;i<10;i++){
document.write('<tr>')
for(var j=1;j<=i;j++){
document.write('<td>'+ i+'*'+j+'='+i*j+'</td>')
}
document.write('</tr>');
}
document.write('</table>');
</script>
<script src=""></script>
</head>
<body>
</body>
</html>