发表于: 2019-04-11 23:07:54
1 627
今天完成的事情:
1.对任务六进行了修改。
2.了解了ie盒子和标准盒子的区别。

代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div style="box-sizing: border-box;width:100px;height:100px;padding:20px;border:1px solid blue;margin:3px;">IE盒子</div>
<div style="box-sizing:content-box;width:100px;height:100px;padding:20px;border:1px solid blue;margin:3px;">W3c(标准)</div>
</body>
</html>
明天的计划:
1.完成任务六。
2.学会下拉菜单的使用。
遇到的问题:
1.不怎么会调试下拉菜单、
收获:
1.会使用css实现文字过长显示省略号
css实现网页中文字过长截取...
title class应该这样写:
.title{ width:300px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
说明:
1、宽度一定要设置,可以根据实际需求调整。
2、white-space:nowrap是禁止文字折行。
3、text-overflow表示当文本溢出时是否显示省略标记,有两个值:
clip:不显示省略标记(...),而是简单的裁切。
ellipsis:当对象内文本溢出时显示省略标记(...)
4、overflow:hidden表示溢出内容为隐藏。
评论