注:imageId为图片id
<style type="text/css">
#imageId{
display:block;
position:relative;
margin:auto;
}
<style type="text/css">
#imageId{
display:block;
position:relative;
margin:auto;
}
</style>
class Person{
constructor(name,age){
this.name = name;
this.age = age;
}
get message()
{
return "name:"+this.name+",age:"+this.age
}
}
var me = new Person("zt",23);
console.log(me.message);
http://www.xakyz.com/