Home > Web Front-end > HTML Tutorial > html/css相关的小技巧(1)_html/css_WEB-ITnose

html/css相关的小技巧(1)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:16:52
Original
1141 people have browsed it

1、a标签的链接顺序,link-visited-hover-focus-active。

2、marquee标签,我之前基本上没有用到过这个标签,在最近的面试中才知道这个标签的强大之处,他可以帮我们实现滚动在固定范围内的上下,左右滚动等效果。marquee有以下几个属性

(1)direction,控制滚动方向,属性值有left,right,up,down;

(2)behavior,控制滚动方式,属性值有scroll连续滚动,slide只滚动一次,alternate往返滚动;

(3)loop,控制循环次数,默认是循环;

(4)scrollamount,控制滚动速度,默认是6;

(5)scrolldelay,控制停顿时间,默认是0;

(6)onmouseout=this.start().onmouseover=this.stop(),鼠标控制事件;

(7)align,控制垂直对其方式,属性值有top,middle,bottom,默认middle;

2、高度不定的元素实现垂直居中,我们可以使用display:table

   html和css代码

<div class=""parent>     <div class="child"><br />   <br />     111111111111111111111111      </div></div>
Copy after login

.parent{  width:800px;  height:400px;  border:1px solid red;  display:table;  text-align:center;}.child{  display:table-cell;  vertical-align:middle;}
Copy after login

 

    

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template