如何使用 CSS 在本机脚本中移动标签?

How to move a label in native script using CSS?

我试图在页面上移动标签,但它根本没有移动。

这是代码:

<Label text="Hello" class="hello" @tap='hello' />

CSS代码:

 .hello{
outline: none;                  
height: 55px;                   
color:black;                  
width:400px;
top:50px;
left:30px;
}

试试这个:

.hello{
    outline: none;                  
    height: 55px;                   
    color:black;                  
    width:400px;
    position:fixed;  /* add */
    top:50px;
    left:30px;
}