设置img水平垂直居中
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <style type="text/css"> img{ position: absolute; top:50%; left:50%; transform: translate(-50%,-50%); } </style> </head> <body> <form id="form1" runat="server"> <img alt="" src="/images/qhfgs@2x.png" /> </form> </body> </html>
单纯水平居中可以使用
margin:0 auto;width:100px
本博客是个人工作中记录,更深层次的问题可以提供有偿技术支持。
另外建了几个QQ技术群:
2、全栈技术群:616945527
2、硬件嵌入式开发: 75764412
3、Go语言交流群:9924600
闲置域名WWW.EXAI.CN (超级人工智能)出售。
另外建了几个QQ技术群:
2、全栈技术群:616945527
2、硬件嵌入式开发: 75764412
3、Go语言交流群:9924600
闲置域名WWW.EXAI.CN (超级人工智能)出售。