子网页实战练习

news/2024/7/8 2:54:43

定位

<!-- <!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>子绝夫相</title>
<style>
 *{
  margin: 0px;
  padding: 0px;
 }
 ul{
  list-style: none;
  width: 800px;
  height: 50px;
  margin: 0 auto;
  margin-top: 100px;
  background: #ccc;
 }
 ul li{
  float:right;
  width: 100px;
  line-height: 50px;
  text-align: center;
 }
 ul li:nth-of-type(3){
  background: yellow;
 }
</style>
</head>
<body>
 <ul>
  <li>服装城</li>
  <li>美妆馆</li>
  <li>京东</li>
  <li>超市</li>
  <li>全球网购</li>
  <li>闪购</li>
  <li>团购</li>
  <li>拍卖金融</li>
 </ul>
</body>
</html> -->
<!-- <!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>绝对定位水平居中</title>
 <style>
 .box{
width: 300px;
height: 50px;
background: red;
position: absolute;
left:50%;
margin-left:-150px;

 }

 </style>
</head>
<body>
 <div class="box"></div>
</body>
</html> -->
1
<!-- <!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>定位练习</title>
 <style>
  *{
   margin: 0px;
   padding: 0px;
  }
  div{
   width: 300px;
   height: 300px;
   border: 1px solid #ccc;
   margin: 0 auto;
   margin-top:100px;
   position: relative;
  }
  div img{
   width: 300px;
   height: 200px;
  }
  /*目前没有精灵图*/
  div .hot{
   width: 45px;
   height: 44px;
   /*display: inline-block;*/
   background: url("img/tuangou.png") no-repeat 0px -280px;
   position: absolute;
   top: 0px;
   right: 0px;
  }
  div .price{
   /*display: inline-block;*/
   width: 134px;
   height: 42px;
   background: url("img/tuangou.png") no-repeat 0px -362px;
   position: absolute;
   left:-7px;
   top:163px;

  }
 </style>
</head>
<body>
<div>
<img src="t01aaddc9d9b0d1e45d.jpg" alt="">
<span class="hot"></span>
<span class="price"></span>
<p>是你的夫君外后浮动那你就</p>
</div>

</body>
</html> -->

2
<!DOCTYPE html>
<html lang="en">
<head>
 <meta charset="UTF-8">
 <title>定位练习2</title>
 <style>
 *{
  margin: 0px;
  padding:0px;
 }
 div{
  width: 520px;
  height: 280px;
  border: 2px solid #000;
  margin: 0 auto;
  margin-top:100px;
  position: relative;
 }

 div span{
   display: block;
   width: 40px;
   height: 80px;
   background-color: rgba(0,0,0,0.3);
   margin-top: 10px;
   font-size:50px;
   color: white;
   text-align: center;
   line-height: 80px;


  }
  div .leftArrow{
   position: absolute;
   left:0px;
   top:69px;
  }
   div .rightArrow{
    position: absolute;
    right:116px;
   top:69px;
   }
 ol{
   list-style: none;
   width: 200px;
   height: 40px;
   background:rgba(255,255,255,0.7);
   position: absolute;
   right: 8px;
   bottom: 10px;
 }
   ol li{
  width: 40px;
  /*height: 40px;*/
  border: 1px solid gold;
  /*让li水平排版*/
  float: left;
  /*加边框使得元素空间变大,让防止*/
  box-sizing: border-box;
  /*水平垂直居中*/
  text-align: center;
  line-height: 40px;
  /*定位 没有方向时候脱离标准流层叠在一起*/
   }
 </style>
</head>
<body>
<div>
 <img src="TB1EMhjIpXXXXaPXVXXXXXXXXXX.jpg_.webp" alt="">
 <span class="leftArrow">&lt;</span>
 <span class="rightArrow">&gt;</span>
   <ol>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
   </ol>
</div>
</body>
</html>

1634159-20190320222528783-318650555.jpg
1634159-20190320222531427-203542158.jpg



来自为知笔记(Wiz)


转载于:https://www.cnblogs.com/8-y-m-l/p/10568225.html


http://www.niftyadmin.cn/n/4556247.html

相关文章

要查找相同数据并且要把这些数据显示出来 编个程序

数据结构是啥样的 谁猜的出来 然后就是显示了.一条条显示如果多的话就分页...思路是这样 select * from 数据库 where 条件...这样就可以找到你要的数据了 连接数据库啊 这些东西你不说 程序的话就要你自己写了.我不是学c的.不过我想有了思路一般就没问题了吧. ||| 查找啥数据

leecode第五题(最长回文子串)

class Solution { public:string longestPalindrome(string s) {int len s.length();if (len 0 || len 1)return s;int index 0, max_num 1;for (int i 1; i < len; i)//检测奇数上的左右是否相同&#xff0c;例如aba&#xff0c;以b为中心{int t i - 1, tt i 1, c…

求C#关于线程池的简单例子

ArticleID21459 ArticleID7106Web中使用多线程来增强用户体验http://www.dezai.cn/article_show.asp ArticleID24745线程处理教程该文章转载自德仔工作室&#xff1a;http://www.dezai.cn/article_show.asp 线程异步调用该文章转载自德仔工作室&#xff1a;http://www.dezai.cn…

性能测试之二八原则

二八原则&#xff1a;80%的业务量在20%的时间内完成 某个网站高峰时间为下午1点到2点&#xff0c;人数达到360000人&#xff1b; 业务量360000&#xff1b; 时间&#xff1a;60*60s&#xff1b; 最大tps&#xff1a;360000*0.8 / 60*60*0.240 转载于:https://www.cnblogs.com/y…

C盤格式化會咋樣

不能 格式化了 系统崩溃 但是可以重新装系统 ||| 不能~除非你装两个系统~然后在另一个系统里格式话这个盘~或者在DOS情况下~

[Objective-C语言教程]多态(26)

多态性这个词表示有许多形式。 通常&#xff0c;当存在类的层次结构并且通过继承相关时&#xff0c;会发生多态性。 Objective-C多态表示对成员函数的调用将导致执行不同的函数&#xff0c;具体取决于调用该函数的对象的类型。 考虑下面一个例子&#xff0c;有一个基类Shape类&…

自学有什么好方法学习C和C++

要熟记各种库函数和语法结构&#xff1b;多用c的类 另外多交流讨论也是必不可少的 引用等练习程序编写尽量一题多解&#xff1b;不忘考虑运行效率 指针 函数重载 模板 程序语言学习最重要的就是练习 ||| 先学C~有耐心~学好了C~理解C就简单了~不过做C的高手不容易~ 总结方法技巧…

天下武功唯快不破--速度要快

进入题目链接&#xff0c;查看源代码后看到了 意思就是利用POST方法快速提交呗&#xff0c;F12&#xff0c;看一下Response,看到了BASE64编码过的FLAG字段&#xff0c;刷新一次都会改变headers FLAG里的内容&#xff0c;所以要提交快噢 因此写个PY脚本来POST提交&#xff0c;得…