今天学习的时候,突然发现一些小问题,之后才终于找到了,解决问题的方法!
开始代码:
background: #3a2aff;
text-align: center;
color: red;
text-decoration: none;//去下划线
margin-right:5px;//向右移动5px
font:bold 20px/50px Arial;
在浏览器上发现无效,如图:
并没有分开,字体也没有居中
解决方法:在其前面分别加上float right和float size如下:
text-align: center;
color: red;
text-decoration: none;//去下划线
float right;margin-right:5px;//向右移动5px
float size;font:bold 20px/50px Arial;
浏览器显示:
完成操作!
希望可以帮到大家!