当前位置: 首页 > news >正文

供应网站建设公司评价怎样建立自己网站

供应网站建设公司评价,怎样建立自己网站,关于网站开发的学校,南通六建网站目录 css三角 鼠标样式 例子:页码模块 溢出文字表示方式 margin负值运用 css三角强化 css三角 css三角中:line-height:0和font-size:0是防止兼容性的问题 jd {position: relative;width: 120px;height: 249px;background-…

                 目录

css三角

鼠标样式

例子:页码模块

溢出文字表示方式

margin负值运用

css三角强化


css三角

css三角中:line-height:0和font-size:0是防止兼容性的问题

jd {position: relative;width: 120px;height: 249px;background-color:pink;
}.jd span {position:absolute;right:15px;top:-10px;width:0;height:0;line-height:0;font-size:0;
}

鼠标样式

1 更改用户鼠标样式:

<ul>
<li style="cursor:default;"></li>
<li style="cursor:pointer;"></li>
<li style="cursor:move;"></li>
<li style="cursor:text;"></li>
</ul>

2 去除输入框表格蓝色边框outline
 

input,textarea {outline: none;
}
<input type="text">

3 让textarea无法修改大小

textarea {resize:none;
}
<textarea name="" id=""></textarea>

4 vertical-align 设置图片或者表单和文字垂直对齐

vertical-align:baseline默认父元素基线对齐;

top,middle,bottom

5 vertical-align: bottom

vertical-align只针对行内或者行内块元素有效
文本域属于行内块元素

textarea {vertical-align: middle;默认是基线对齐}

这样能使得当左边是图片右边是文字时候,文字在左边图片中间的位置

bug:图片底侧会有空白缝隙,由于行内块元素和文字基线对齐
解决: 1 给图片添加vertical-align:middle,top,bottom
2 display: block

例子:页码模块

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>.box a {/* 必然有大小但是只有行内块才有大小 */display: inline-block;width: 36px;height: 36px;background: color #f7f7f7;/* 里面文字水平居中垂直居中去掉下划线 */border: 1px solid #ccc;text-decoration: none;line-height: 36px;text-align: center;color: black;font-size: 14px;}.box .prev,.box .next {width: 85px;}.box .current {border: none;background-color: #fff;}.box input {height: 36px;width: 45px;border: 1px solid #ccc;outline: none;}.box button {height: 40px;width: 45px;border: 1px solid #ccc;}</style>
</head><body><div class="box"><a href="#" class="prev">&lt;&lt;上一页</a><a href="#" class="current">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">6</a><a href="#" class="elp">7</a><a href="#" class="next">&gt;&gt;下一页</a>到第<input type="text">页<button>确定</button></div></body></html>

溢出文字表示方式

溢出的文字省略号显示:
1 单行文本溢出显示省略号

white-space: nowrap;
强制一行内显示文本
overflow:hidden
超出部分隐藏
文字用省略号替代超出的部分
text-overflow:ellipsis;
 

<style>.ti {width: 40px;height: 40px;background-color: pink;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}</style><div class="ti">abcddddddddddddddd</div>


2 多行文本溢出显示省略号

display: -webkit-box;
弹性伸缩盒子模型显示
-webkit-line-clamp: 2;这表示省略号出现在第二行
设置或检索伸缩盒对象的子元素排列方式
-webkit-box-orient: vertival;

overflow:hidden;
text-oveflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp:2;
-webkit-box-orient:vertical;

margin负值运用

后面盒子压住前面盒子

ul>li{$}*5<style>ul li {float: left;list-style: none;width: 200px;height: 200px;border: 2px solid red;margin-left: -2px;/* 这里是-2,因为边框是2px */}</style>

鼠标经过某个盒子后提高当前盒子的层级:

没有定位加相对定位,只能相对定位,其他定位不占位置,有定位,加z-index
position: relative;
border: 1px solid blue;
z-index:1;压住别的盒子

<style>ul li {position: relative;float: left;list-style: none;width: 200px;height: 200px;border: 2px solid red;margin-left: -2px;/* 这里是-2,因为边框是2px */}ul li:hover {border: 2px solid blue;z-index: 1;}</style>

 水平居中:行内块的父亲添加text-align:center

那么这个盒子里所有行内元素和行内块元素都会水平居中

css三角强化

.box {把上边框宽度调大border-top: 100px solid transparent;border-right: 50px solid blue;border-bottom: 0 solid blue;border-left:0 solid green;左边和下边边框宽度为0
}
简写:
width:0
height:0
border-color: transparent red transparent transparent
上右下左
border-style: solid;
border-width: 22px 8px 0 0;
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>/* .box {border-top: 100px solid transparent;border-right: 50px solid blue;border-bottom: 0 solid blue;border-left: 0 solid green;/* margin: 0 auto; *//* } */.price {width: 160px;height: 24px;border: 1px solid red;margin: 0 auto;line-height: 24px;text-align: center;}.miaosha {position: relative;float: left;width: 80px;height: 100%;background-color: palevioletred;text-align: center;}.miaosha i {position: absolute;right: 0;/* top: 0; */bottom: 0;width: 0;height: 0;border-color: transparent #fff transparent transparent;/* 上右下左 */border-style: solid;border-width: 24px 12px 0 0;}.origin {text-decoration: line-through;font-size: 12px;color: gray;}</style>
</head><body><div class="box"></div><div class="price"><span class="miaosha">$100<i></i></span><!--这个三角差点因为没放span里所以无法显示,而且想让三角贴着父容器即span显示,需要span加上relative而i加上absolute--><span class="origin">$200</span><!-- line-height继承的,两个span都要垂直居中,直接给他们父元素添加line-height --></div>


 

http://www.khdw.cn/news/60280.html

相关文章:

  • 怎样在网上打广告鸡西seo
  • 南山网站设计公司怎么给自己的公司做网站
  • 湖北建设工程造价协会网站郑州网络营销公司有哪些
  • 上海商城网站开发网店代运营公司
  • 有没有在家做的兼职网站域名备案查询系统
  • 在vs2010里怎么做网站湖北网站seo
  • 北京平台网站建设费用西安官网seo技术
  • 上海网站建设公司电国家认可的赚钱软件
  • 营销型网站建设制作企业培训内容包括哪些内容
  • 加强政府网站建设管理的重要性电商网站建设 网站定制开发
  • 做思维导图的网站网站模板之家免费下载
  • 做网站还是做淘宝如何免费做网站
  • 58做网站一年多少钱seozou是什么意思
  • 北京有哪些大型互联网公司武汉抖音seo搜索
  • 做企业网站主题要自制吗建站流程主要有哪些
  • 建设网站的公司专业服务网页浏览器
  • 怎么做校园表白网站长尾关键词排名推广
  • 手机网站设计技巧百度指数的使用方法
  • 如何建设网站安全管理制度烟台seo网络推广
  • 网站域名用公司注册信息查询百度指数官网入口登录
  • 西安网站建设那家伙seo咨询常德
  • 河北建设工程信息网招标公告唐县水利局seo排名优化教学
  • 绵阳网站建设哪家好网推广公司
  • 射阳做网站网站制作开发
  • 宝安做网站多少钱昆明装饰企业网络推广
  • wordpress内置函数seo日常工作内容
  • 办公室现代简约装修武汉seo
  • 河南省工程建设信息网官网入口嘉兴seo网络推广
  • 企业自建网站有哪些百度网盘下载电脑版官方下载
  • 网站百度不到推广网站公司