display:block;

    技术2026-08-06  7

    就是给<div>标签命了一个id号,可以javascipt来控制这个层的样式之类的。style"display:block"就是给了这个<div>一个显示的样子。意思就是块,加了这个样式,一个元素会自动为一行,如果是链接的话,点击这个行任何地方都会有链接,而不只是点击链接的字才有链接,用言语很难表达明白。给你一个案例。aa.htm文件里面的代码是<style>a{background:blue;display:block;color:#fff}</style><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a>bb.htm文件里面的代码是<style>a{background:blue;color:#fff}</style><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a><a href="http://www.gift12345.com/">http://www.gift12345.com</a>

    最新回复(0)