![](https://i-blog.csdnimg.cn/blog_migrate/79b4dd3fdac3225224dee311f18b6fee.png)
<style>
*{
box-sizing: border-box;
}
span{
display: inline-block;
width: 85px;
height: 30px;
line-height: 30px;
margin: 5px;
padding: 0 10px;
background-color: pink;
border-radius: 5px;
}
</style>
<script>
for(let i =1;i<=9;i++){
for(let j=1;j<=i;j++){
document.write(`<span>${j}x${i}=${j*i}</span>`)
}
document.write('<br>')
}
</script>