前端开发设计图常遇问题

1、去掉默认样式,input点击时的蓝框

input,select,textarea{outline:none;}


2、/*文本域*/

<textarea name="summary" cols="60" rows="5">请写入个人简介,不少于200字!</textarea>

文本域固定,大小不变

textarea{resize:none;}


3、消除移动端默认的点击高亮效果
a{
  -webkit-tap-highlight-color:rgba(0,0,0,0);
  }


4、文字多,多余的用“...”表示
      {white-space: nowrap;/*让文字不换行*/
overflow:hidden;
text-overflow:ellipsis;
-o-text-overflow:ellipsis;
-icab-text-overflow: ellipsis;
-khtml-text-overflow: ellipsis;
-moz-text-overflow: ellipsis;
-webkit-text-overflow: ellipsis;}


5、/*清楚浮动*/

.clearfix:after{content:"";display:block;clear:both;}
.clearfix{zoom:1;}

6、/*边框发光*/

      {border:1px solid #ddd;
box-shadow:0 0 8px #ddd;
-moz-box-shadow:0 0 8px #ddd;
-webkit-box-shadow:0 0 8px #ddd;}

7、/*调用文件*/
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/tab.js"></script>

8、<!--视口标签,让手机以一定标准尺寸呈递页面-->
<meta content="wiidth=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>

9、<!--定义网站的关键字:Keywords用于说明定义的是关键字,value用于说明为该网页定义的关键字,可以是多个关键字。当利用搜索引擎搜索图书时,输入任何一个关键字都可以搜索到该网页。-->

<meta name="keywords" content="计算机、英语、经管、财会、职场" /> 



10、<!--定义网站的说明 :-->

<meta name="description" content=" 经典论坛 网站,网页,设计,开发,编程,制作 - Discuz! Board" />

11、/*不透明度*/

{opacity:0.6}


12、/*文本缩进*/>
p{
  text-indent:10px;
}

13、/*图片可以跟着盒子变大小*

{background:url(images/0.1jpg) center no-repeat; 

background-size:cover;}或者

{background:url(images/0.1jpg) center no-repeat; 

background-size:100%;}

 //center是是图片居中,还可以改成left,right,或者具体像素,例如10px; no-repeat是图片不重复就一张


  

猜你喜欢

转载自blog.csdn.net/sdd_95/article/details/61427060