.vue
: style 放在最后
<template>
<div>
<table style="height:100px;" border = "black" width = "370px" align="center" border-spacing="10px" >
<tr>
<td aligh = "center" colspan="5" class="zitidaxiao" >在线接单
<img src="../assets/头像1.png"
class="img_class">
</td>
</tr>
</table>
</div>
</template>
<script>
export default {
data() {
return {
active: 0,
tabBtnList:['来连麦','推荐','王者荣耀','和平精英'] ,
value:'simple',
good_icon:[
{
imgurl:require('../assets/2.png'),
good_txt:'头像1'
},{
imgurl:require('../assets/头像1.png'),
good_txt:'头像2'
}
],
icon: {
active: 'https://img01.yzcdn.cn/vant/user-active.png',
inactive: 'https://img01.yzcdn.cn/vant/user-inactive.png',
},
};
},
};
</script>
<style scoped>
.index_header{
width:3.5rem;border:0;
margin:.1rem 0 0 .1rem;
padding:0;
}
.custom-title {
margin-right: 4px;
height:10rem;
vertical-align: middle;
}
.search-icon {
font-size: 100px;
height: 5rem;
line-height: inherit;
}
.van_cell{
margin-top: 100px;
height:50px;
font-size:20px;
text-align: center;
}
.van_cell2{
margin-top:200px;
}
.img_class{
padding-top: 60px;
width:40px;
height: 40px;
float: right;
}
.zitidaxiao{
font-size:18px;
text-align: center
}
.eee{
margin-top: 10px;
}
</style>
.html
style 放在中部
<!DOCTYPE html>
<html>
<head>
<style>
body{
background-color:lightblue;
}
h1{
color:white
text-align:center
}
p{
font-family: verdana;
font-size: 20px;
}
</style>
</head>
<body>
<h1>这是我的第一个CSS实例</h1>
<p>我是一个段落</p>
</body>
</html>