今天一个朋友问我一个问题,效果如图:
实现代码如下:
XML/HTML代码
- <!DOCTYPE?html?PUBLIC?”-//W3C//DTD?XHTML?1.0?Transitional//EN”?”https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>??
- <html?xmlns=“https://www.w3.org/1999/xhtml”>??
- <head>??
- <meta?http-equiv=“Content-Type”?content=“text/html;?charset=utf-8”?/>??
- <title>无标题文档</title>??
- </head>??
- ??
- <body>??
- <div?style=“?position:relative;?border:1px?#CCC?solid;?height:28px;?width:500px;?margin:0?auto;?padding:1px”>??
- ??<div?style=“?background:#3F9;?height:28px;?width:200px”></div>??
- ??<strong?style=“?position:absolute;?width:500px;?top:7px;?text-align:center;?overflow:hidden”>你的经验是1000,下级是2000</strong>??
- </div>??
- </body>??
- </html>??
期待大家有更好的解决方案。
最新评论
写的挺好的
有没有兴趣翻译 impatient js? https://exploringjs.com/impatient-js/index.html
Flexbox playground is so great!
感谢总结。
awesome!
这个好像很早就看到类似的文章了
比其他的教程好太多了
柯理化讲的好模糊…没懂