学了前端一年多似乎没怎么做笔记,写下零碎

样式的重置

table {

         border-collapse:collapse;

         border-spacing:0;

}

ol,ul {

         list-style:none;

}

q:before,q:after,

blockquote:before,blockquote:after {

         content:"";

}

 

光标形状设置:cursor:pointer; (手形)

ico图标(网站标题中的,可用网上的在线工具切换格式):

<link href="图标的路径"rel="shortcut icon">

 

 

*可以引入在线的jQuery文件,无需下载,也可以引入在线的图片等。

 

*设置背景颜色渐变时采用解决浏览器的兼容问题的方法

 

*设置div框的圆角:border-radius:0,0,10px,10px;

 

注意类样式的继承问题和div架构之间的排列方法关系

图片文本居中:vertical-align:middle;

图片透明度:opacity:1到0之间取值;

 水平居中:line-height:40px;

文字居中:text-align:center;

<h1 align=”center”>标题内容</h1>

鼠标滑过样式:

.header-right a:link,.header-righta:visited

{

         text-decoration:none;

         color:#939393;

         font-size:17px;

         font-family:"微软雅黑Light";     

}

.header-right a:hover,.header-righta:active

{

         text-decoration:none;

         color:#939393;

         font-size:20px;

         font-family:"微软雅黑Light";

}

 

**隐藏内容:

visibility:hidden;/visible;

display

Position:relative;/absolute

z-index:可设置层的先后

Overfloat:可设置滚动条

修复浏览器兼容问题:火狐:-mox-box-shadow:0 0 8px #DDD;

                     谷歌:-webkit-box-shadow:00 8px #DDD;

层相对于屏幕纵深方向的次序:z-index:2;z-index:2;

使用HTML5的Placeholder属性实现input输入框背景文字提示效果:

在你的input文本框的标记上添加HTML5规范里新增的placeholder属性,然后在属性值里输入你需要的提示信息。

例子:

<form><input type="text"placeholder="你的姓名..."name="lname"><input type="password"placeholder="你的密码..."name="pass"><input type="submit"value="提交"></form>

相关文章:

  • 2021-10-20
  • 2021-12-30
  • 2021-07-04
  • 2021-10-11
  • 2022-12-23
  • 2021-07-19
  • 2021-12-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2021-11-03
  • 2021-11-28
相关资源
相似解决方案