本文主要包含CSS,按钮等相关知识,_RAt 希望在学习及工作中可以帮助到您
参考了天猫、微博等网站的做法,用纯html和css实现,效果还是不错的。
以下是成果,兼容主流浏览器,包括ie6。
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta http-equiv="Content-Language" content="zh-CN" />
- <meta name="Keywords" content="" />
- <meta name="Description" content="" />
- <title></title>
- </head>
- <style type="text/css">
- *{margin:0; padding:0; list-style:none; font:normal 12px/150% 宋体; }
- body{ padding:20px; }
- .arrow{ margin-bottom:20px; }
- /* css三角形 */
- .arrow,.arrow s { position:relative; display:block; font-size: 0; line- height: 0; width: 0; height: 0; border-color:transparent; border-style:dashed; border-width:5px; }
- .arrowR,.arrowR s{ border-left-color:#aaa; border-left-style:solid; }
- .arrowR s{ border-left-color:#fff; position:absolute; left:-7px; top:-5px; }
- .arrowR:hover{ border-left-color:#f60; }
- .arrowL,.arrowL s{ border-right-color:#aaa; border-right-style:solid; }
- .arrowL s{ border-right-color:#fff; position:absolute; rightright:-7px; top:-5px; }
- .arrowL:hover{ border-right-color:#f60; }
- .arrowT,.arrowT s{ border-bottom-color:#aaa; border-bottom-style:solid; }
- .arrowT s{ border-bottom-color:#fff; position:absolute; left:-5px; top:-3px; }
- .arrowT:hover{ border-bottom-color:#f60; }
- .arrowB,.arrowB s{ border-top-color:#aaa;