头像在左,右边显示两行文字(用表格实现)

直接上代码:

这里的图片本身是正方形,加了圆形头像效果


<html>
<head>
	<style type="text/css">
		.basicInfo-left{
	width: 80px;
	height: 80px;
}
.basicInfo-left img{
	width: 100%;
	height: 100%;
	border-radius: 50px;
}
	</style>
  
 
</head>
<body>
	
	<table border="" cellspacing="" cellpadding="" frame="void" rules="none">
		<!-- <tr><th>Header</th></tr> -->
		<tr>
			<td rowspan="2">
				<div class='basicInfo-left' >
					<img src='img/touxiang.jpg'>
				</div>
			</td>
			<td>name</td>
		</tr>
		<tr>
			<td><button type="button">添加好友</button></td>
		</tr>
	</table>
 

</body>
</html>

截图:
在这里插入图片描述

发布了25 篇原创文章 · 获赞 5 · 访问量 1417

猜你喜欢

转载自blog.csdn.net/weixin_42245375/article/details/103264577