第一次看完视频,写的乱七八糟,很多东西摆不到应有的地方,没办法,在浏览器按f12键,查看人家的源代码,发现很多东西用了ul和li的组合插入文字,图片,而是原来HTML和css组合也没这么难,大神的代码实现也是很平凡很淡。
- body {
- margin: 0 auto;
- border: 1px solid red;
- }
- .mast {
- margin: 0 auto;
- width: 1180px;
- background-color: rgb(88, 88, 88);
- }
- .top {
- background-color: #222222;
- height: 30px;
- }
- .logo {
- width: 1180px;
- margin: 0 auto;
- background-color: yellow;
- }
-
- /* 从这里开始一律采用左/右浮动 */
- .logoimg {
- float: left;
- width: 145px;
- height: 95px;
- background-color: #25c058;
- }
- .dapp {
- float: right;
- width: 160px;
- background-color: yellow;
- }
- .sousuo{
- float: right;
- width: 940px;
- height: 40px;
- background-color: #174b12;
- margin-top: 25px;
- }
- .sousuo1{
- float: left;
- width: 550px;
- height: 40px;
- background-color: rgb(0, 255, 98);
- }
- .sousuo2{
- float: right;
- width: 300px;
- height: 40px;
- background-color: rgb(10, 30, 92);
- }
- .toutiaolianjie{
- float: left;
- width: 1180px;
- height: 75px;
- background-color: #c9141d;
- margin-top: 26px;
- }
- .guanggaolan{
- float: left;
- width: 1180px;
- height: 100px;
- background-color: #DEE1EA;
- margin-top: 20px;
- }
- .guanggaolan1{
- float: left;
- width: 1030px;
- height: 100px;
- background-color: rgb(99, 75, 155);
- }
- .guanggaolan2{
- float: right;
- width: 144px;
- height: 100px;
- background-color: rgb(10, 30, 92);
- }
- .xinwen{
- float: left;
- width: 1180px;
- height: 1150px;
- background-color: rgb(71, 71, 71);
- margin-top: 20px;
- }
- .imgxinwen{
- float: left;
- width: 320px;
- height: 1120px;
- background-color: rgb(255, 123, 123);
- }
- .bigimg{
- float: left;
- width: 320px;
- height: 213px;
- background-color: rgb(251, 0, 0);
- }
- .smallimg{
- float: left;
- width: 320px;
- height: 320px;
- background-color: rgb(251, 0, 0);
- margin-top: 10px;
- }
- .smallimgtable{
- float: left;
- width: 320px;
- height: 320px;
- background-color: rgb(0, 153, 255);
- }
- .smallimgall{
- float: left;
- width: 155px;
- height: 155px;
- background-color: rgb(163, 163, 163);
- }
- .shipinbiaoti{
- float: left;
- width: 320px;
- height: 20px;
- background-color: rgb(163, 163, 163);
- margin-top: 30px;
- }
- .shipin1{
- float: left;
- width: 320px;
- height: 160px;
- background-color: rgb(123, 255, 0);
- margin-top: 12px;
- }
- .leftnews1{
- float: left;
- width: 320px;
- height: 70px;
- background-color: rgb(55, 0, 255);
- margin-top: 15px;
- }
- .shipin2{
- float: left;
- width: 320px;
- height: 104px;
- background-color: rgb(123, 255, 0);
- margin-top: 30px;
- }
- .leftnews2{
- float: left;
- width: 320px;
- height: 127px;
- background-color: rgb(230, 54, 186);
- margin-top: 15px;
- }
- .textxinwen{
- float: left;
- width: 440px;
- height: 1120px;
- background-color: rgb(30, 255, 49);
- margin-left: 25px;
- }
- .textnewsall{
- float: left;
- background-color: rgb(0, 202, 185);
- }
- .textnews1{
- float: left;
- width: 440px;
- height: 225px;
- background-color: rgb(0, 202, 185);
- }
- .textnews1,.textnews2,.textnews3,.textnews4,.textnews5{
- float: left;
- width: 440px;
- height: 180px;
- background-color: rgb(177, 106, 167);
- margin-top: 30px;
- }
- .textnews6{
- float: left;
- width: 440px;
- height: 20px;
- background-color: rgb(177, 106, 167);
- margin-top: 30px;
- }
- .biaotilan{
- float: right;
- width: 300px;
- height: 1120px;
- background-color: rgb(72, 52, 255);
- }
- .right1{
- float: left;
- width: 300px;
- height: 450px;
- background-color: rgb(217, 255, 0);
- }
- .right2{
- float: left;
- width: 300px;
- height: 250px;
- background-color: rgb(217, 255, 0);
- margin-top: 12px;
- }
- .right3{
- float: left;
- width: 300px;
- height: 414px;
- background-color: rgb(217, 255, 0);
- margin-top: 10px;
- }