CSS 对联代码实例 |
您所在的位置:网站首页 › 简单的春联怎么做 › CSS 对联代码实例 |
分享一段简单的代码实例,它用css实现了对联效果。 如果需求js实现的两端漂浮的对联效果,可以查阅特效下载版块广告代码分类。 代码实例如下: 前端教程网 .wrap{ max-width: 500px; margin-left: auto; margin-right: auto; } .wrap:after{ content: ''; display: block; clear: both; } .flag{ position: relative; background-color: red; width: 100px; overflow: hidden; } .top,.bottom{ display: inline-block; width: 100px; height: 18px; background-color: yellow; } .bottom{ position: absolute; bottom: 0; } p{ text-align: center; font-size: 64px; } #flag{ float: left; } #flag2{ float: right; }猴年吉祥 鸡年纳福 上述代码实现了简单的对联广告效果。 CSS 对联代码实例,这样的场景在实际项目中还是用的比较多的,关于CSS 对联代码实例就介绍到这了。 CSS 对联代码实例属于前端实例代码,有关更多实例代码大家可以查看。 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |