当前位置:网站首页>网页设计(二)
网页设计(二)
2022-08-07 13:04:00 【默 一】
系列文章目录
提示:这里面的图片和文字都可以更改,里面的属性稍微改一下,可以更好地达到预期的效果
例如:tu1、tu2、wen等
提示:一些之前讲过的我不在重复,新的重点在下面
前言
提示:我用的vsc软件进行编写代码,一些地方可能与大家的不同,这个需要注意一下:
例如:图片的路径等
提示:以下是本篇文章正文内容,下面案例可供参考
一、代码
我把htmll和css部分分开了,这是HTML部分代码
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css.css">
<title>QCSJ</title>
<style type="text/css"></style>
<body>
<div class="zj">
<div class="bt">
<a class="logo" href="#">QCSJ</a>
<a class="kb"></a>
<a class="shouye" href="#">首页</a>
<a class="lz" href="#">利兹</a>
<a class="fh">&</a>
<a class="gd" href="#">小岛</a>
</div>
<div class="qy"> 每一段时光,只要放在心上,就是地久天长</div>
<div class="qy2"> Meet a person, the world right to change---遇见一个人,世界权改变</div>
<div class="nr">
<div class="bt1">
<p style="font-size: 36px;color: lightpink;text-align: center;line-height: 50px;">The world is so beautiful</p>
<p style="font-size: 18px;color:moccasin;text-align: center;line-height: 50px;">I want to show you</p>
</div>
<div class="bt2">
<div class="kbk"></div>
<div class="tw">
<div class="tu1"></div>
<div class="kong"></div>
<div class="wz">The moment I fell in love with you, you will live in my heart forever.</div>
</div>
<div class="kbk"></div>
<div class="tw">
<div class="tu2"></div>
<div class="kong"></div>
<div class="wz">Love is very simple, like three points, cherish seven points.</div>
</div>
<div class="kbk"></div>
</div>
<div class="hk"></div>
<div class="bt3">
<div class="kbk"></div>
<div class="tw">
<div class="tu3"></div>
<div class="kong"></div>
<div class="wz">Because he doesn't like you, so he won't feel sorry for you.</div>
</div>
<div class="kbk"></div>
<div class="tw">
<div class="tu4"></div>
<div class="kong"></div>
<div class="wz">I love you until the end of the world.</div>
</div>
<div class="kbk"></div>
</div>
<div class="hk"></div>
<div class="bt4">
<div class="kbk"></div>
<div class="tw">
<div class="tu5"></div>
<div class="kong"></div>
<div class="wz">the persistence of a sound after its source has stopped</div>
</div>
<div class="kbk"></div>
<div class="tw">
<div class="tu6"></div>
<div class="kong"></div>
<div class="wz">Love understands love; it needs no talk.</div>
</div>
</div>
</div>
<div class="hk"></div>
<div class="bt">
<p style="text-align:center;color: rgb(216, 97, 190);line-height: 80px;">This work was created by myself and stolen must be investigated</p>
</div>
</div>
</body>
</head>
</html>
*{
padding: 0;
margin: 0 auto;
}
html{
height: 100%;
}
body{
height: 100%;
cursor: url(https://images.cnblogs.com/cnblogs_com/jingjingjingjingjingjingrj/1701449/o_200415081944o_cursor.png),auto;
background:url(../QCSJ/photo/20141119024734831.jpg);
background-size: 100%;
}
.zj{
width: 1000px;
height: 2000px;
justify-content: center;
/*align-items: center;*/
}
.bt{
width: 1000px;
height: 80px;
border-bottom:1px solid #000;
box-shadow: 2px 2px 5px #000;
float: left;
margin-bottom: 20px;
}
.logo{
width: 200px;
height: 80px;
text-align: center;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
font-size: 36px;
color:black;
float: left;
line-height: 70px;
display: inline;
text-decoration: none;
}
.kb{
width: 400px;
height: 80px;
float: left;
}
.shouye{
width: 100px;
height: 80px;
}
.lz{
width: 100px;
height: 80px;
}
.fh{
width: 100px;
height: 80px;
}
.gd{
width: 100px;
height: 80px;
}
.shouye,.lz,.fh,.gd{
text-align: center;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
font-size: 36px;
color:black;
float: left;
line-height: 80px;
display: inline;
text-decoration: none;
float: left;
}
.qy,.qy2{
width: 1000px;
height: 60px;
text-align:left;
font-size: 24px;
line-height: 60px;
color:rgb(63, 56, 56);
float: left;
border-bottom:1px solid #000;
box-shadow: 2px 2px 5px #000;
}
.nr{
width: 1000px;
height: 1600px;
float: left;
margin-top: 20px;
border-bottom:1px solid #000;
box-shadow: 2px 2px 5px #000;
}
.bt1{
width: 1000px;
height: 100px;
}
.bt2{
width: 1000px;
height: 460px;
}
.kbk{
width: 100px;
height: 450px;
float: left;
}
.tw{
width: 350px;
height: 450px;
float: left;
border-bottom:1px solid #000;
box-shadow: 2px 2px 5px #000;
}
.tu1{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/YKJ_1022.JPG);
background-size: 100%;
}
.wz{
width: 350px;
font-size: 18px;
text-align: center;
}
.tu2{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/YKJ_1026.JPG);
background-size: 100%;
}
.bt3{
width: 1000px;
height: 460px;
float: left;
}
.tu3{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/oip.jpg);
background-size: 100%;
}
.tu4{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/OIP-C.jpg);
background-size: 100%;
}
.bt4{
width: 1000px;
height: 450px;
float: left;
}
.tu5{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/2021011324936043.jpg);
background-size: 100%;
}
.tu6{
width: 350px;
height: 320px;
background: url(../QCSJ/photo/232003528624.jpg);
background-size: 100%;
}
.kong{
width: 350px;
height: 50px;
}
.hk{
width: 1000px;
height: 50px;
float: left;
}
.hkk{
width: 1000px;
height: 50px;
float: left;
}
二、代码分析
1.鼠标自定义
因为鼠标的属性是全局的,使用必须在body中定义。我们只需要在css中找到cursor就可以了。
例如:
body{
cursor: url(https://images.cnblogs.com/cnblogs_com/jingjingjingjingjingjingrj/1701449/o_200415081944o_cursor.png),auto;
}
2. .shouye,.lz,.fh,.gd{}???
这种方式可以减少代码,以便提高代码的简洁,避免出错。这种的写法就是把相同的属性放在一起了,简单来说就是一个碗里放着很多大小相同的豆腐,而不是一个碗里放一个,这样有利益后期的调试和修改。
3.文字水平居中
这里我们需要在css中找到line-height,div块有多大,line-height的值就选着有多大,就可以了。
4.边框阴影
提示:这个需要我解答,大家可以同3school找到答案
border-bottom:1px solid #000;
box-shadow: 2px 2px 5px #000;
总结
提示:这里对文章进行总结:
例如:以上就是今天要讲的内容,本文仅仅简单的网页,里面的知识很重要。
边栏推荐
- 4. 插件开发原理
- PDF转换工具安装教程
- 微信小程序和微信H5有什么区别?
- AICOCO AI Frontier Promotion (8.7)
- 关于#mysql#的问题:如图创建以上表格,报错代码如下SELECT * FROM studentwhere 姓名 LIKE可%
- R 中因子添加、修改和删除
- 6. Chinese version of cuBLAS Development Guide--SetStream() and SetWorkspace() in cuBLAS
- DiskGenius安装教程
- 周末复盘,高手不卖产品只讲故事!
- Commonly used regular expressions and their use
猜你喜欢

odoo community edition approval flow

rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp)

网安学习-应急响应1

DiskGenius Installation Tutorial

After using the vxe-table row merge, there will be an extra column blank after the merged row.

ReentrantReadWriteLock Read-write lock

若依使用EasyExcel导入和导出数据
![[ASM] Bytecode operation MethodVisitor case combat cinit method generation](/img/b9/716fd265e0b00de12a18511fb316d6.png)
[ASM] Bytecode operation MethodVisitor case combat cinit method generation

目标检测工具箱MMDetection安装及使用示例

Real-time communication by integrating websocket
随机推荐
方正中期期货是正规期货公司吗?开户安全吗?
VMware's record of virtual machine expansion
Ruoyi integrates just-auth to realize third-party authorized login
我说MySQL联合索引遵循最左前缀匹配原则,面试官让我回去等通知
Leetcode 47. Full Permutation II
关于#mysql#的问题:如图创建以上表格,报错代码如下SELECT * FROM studentwhere 姓名 LIKE可%
对话360数字安全集团高级副总裁高瀚昭:政企提升数字安全“看见”能力需全盘考虑不可“以点带面”
2022年危险化学品生产单位安全生产管理人员考试题模拟考试题库及答案
亿纬锂能首件搭载自主研发46系列大圆柱电池系统产品成功下线
网上办理国信证券券开户安不安全?
Container Runtime Notes / CRI-O / CRI-O Installation Instructions
由GEE生成逐月MODIS的NDVI影像
dll repair tool installation tutorial
爱可可AI前沿推介(8.7)
Spire.Office for NET family bucket latest version 7.7.6
在一个页面实现数据库的增删改查
中国石油大学(北京)-《 完井工程》第三阶段在线作业
【学习】代码里引入的包都是啥东西
PDF conversion tool installation tutorial
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp)