一些常言道 css属性,方便以后使用

1.去掉button的所有样式:

border: 0;

background-color: transparent;

outline: none; //消除默认点击蓝色边框效果

但是 ----这个时候,按钮是有边框个的

button::after{

border: none;

border-radius: 0;

}

如果此处的button有背景色,就直接设置background-color成对应的颜色就行了。

把这块加上, 这个格式不要去改,

论gson.toJson()与gson.fromJson()方法

第一步:通过gson.toJson()方法先转为json串;

第二步:通过gson.fromJson(strJson,test.class)转为对应的实体对象(strJson为json串,test.class为类名);

第二种,转换成列表类型:

 一般用来接收前端返回的数据

    str一般为json字符串       Person为pojo类   最后返回一个list    KV键值对   

List<Person> ps = gson.fromJson(str, new TypeToken<List<Person>>(){}.getType());

猜你喜欢

转载自blog.csdn.net/Andybfw/article/details/82753909
今日推荐