前端教程
当前位置: 主页 > 网站资讯 > 前端教程

网页设计核心内容对视觉表现的影响

发布日期:2018-09-26 阅读次数:

<div> 三角形翻转的效果,大家想必见过,这里就把相关代码贴下,大家可以应用哦,当然翻转效果暂时不支持IE 6 7 8。</div> <div> &nbsp;</div> <div> 1、纯CSS做个三角</div> <div> &nbsp;</div> <div> 代码如下:</div> <div> <style type="text/css"></div> <div> .rightdirection</div> <div> {</div> <div> &nbsp;width:0;height:0;</div> <div> &nbsp;line-height:0;</div> <div> &nbsp;border-width:20px;</div> <div> &nbsp;border-style:solid;</div> <div> &nbsp;border-color:transparent transparent transparent #A9DBF6;</div> <div> }</div> <div> .bottomdirection</div> <div> {</div> <div> &nbsp;width:0;height:0;</div> <div> &nbsp;line-height:0;</div> <div> &nbsp;border-width:20px;</div> <div> &nbsp;border-style:solid;</div> <div> &nbsp;border-color: #A9DBF6 transparent transparent transparent;</div> <div> }</div> <div> .leftdirection</div> <div> {</div> <div> &nbsp;width:0;height:0;</div> <div> &nbsp;line-height:0;</div> <div> &nbsp;border-width:20px;</div> <div> &nbsp;border-style:solid;</div> <div> &nbsp;border-color: transparent #A9DBF6 transparent transparent;</div> <div> }</div> <div> .topdirection</div> <div> {</div> <div> &nbsp;width:0;height:0;</div> <div> &nbsp;line-height:0;</div> <div> &nbsp;border-width:20px;</div> <div> &nbsp;border-style:solid;</div> <div> &nbsp;border-color: transparent transparent #A9DBF6 transparent;</div> <div> }</div> <div> </style></div> <div> <div&nbsp; class="rightdirection"></div></div> <div> <p></div> <div> <div&nbsp; class="bottomdirection"></div></div> <div> <p></div> <div> <div&nbsp; class="leftdirection"></div></div> <div> <p></div> <div> <div&nbsp; class="topdirection"></div></div> <div> &nbsp;</div> <div> 2.翻转:实现翻转</div> <div> &nbsp;</div> <div> <!DOCTYPE html></div> <div> <html></div> <div> <head></div> <div> <style></div> <div> &nbsp;</div> <div> &nbsp;</div> <div> .jt b {</div> <div> &nbsp; &nbsp; border-color: #FFD0C0 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);</div> <div> &nbsp; &nbsp; border-style: solid dashed dashed;</div> <div> &nbsp; &nbsp; border-width: 10px;</div> <div> &nbsp; &nbsp; font-size: 0;</div> <div> &nbsp; &nbsp; height: 0;</div> <div> &nbsp; &nbsp; line-height: 0;</div> <div> &nbsp; &nbsp; position: absolute;</div> <div> &nbsp; &nbsp; left: 150px;</div> <div> &nbsp; &nbsp; top: 14px;</div> <div> &nbsp; &nbsp; width: 0;</div> <div> }</div> <div> .jt:hover b {</div> <div> &nbsp; &nbsp; border-color: #ccc rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);</div> <div> &nbsp; &nbsp; transform: rotate(180deg);</div> <div> &nbsp; &nbsp; transform-origin: 50% 30% 0;</div> <div> &nbsp; &nbsp; transition: transform 0.2s ease-in 0s;</div> <div> &nbsp;-moz-transform: rotate(180deg);</div> <div> &nbsp; &nbsp; -moz-transform-origin: 50% 30% 0;</div> <div> &nbsp; &nbsp; -moz-transition: transform 0.2s ease-in 0s;</div> <div> }</div> <div> &nbsp;</div> <div> &nbsp;</div> <div> </style></div> <div> </head></div> <div> <body></div> <div> &nbsp;</div> <div> <div class="jt"></div> <div> &nbsp;<b>你好啊</b></div> <div> &nbsp;</div></div> <div> &nbsp;</div> <div> </body></div> <div> </html></div>