企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
#### **2017-12-2 18:42** #### **author:yang** # **使用css样式实现红色十字架。** ### **红色十字架主要是说不管随着浏览器怎么变化,它的位置永远不变。** css的代码 ~~~ <style type="text/css"> div { position: absolute; background: red; top: 50%; left: 50%; } .d1 { width: 300px; height: 60px; margin: -30px 0 0 -150px; } .d2 { width: 60px; height: 300px; margin: -150px 0 0 -30px; } </style> ~~~ HTML代码 ~~~ <div class="d1"></div> <div class="d2"></div> ~~~