CSS练习

CSS练习

  • 工具
  • 代码
  • 运行结果

工具

HBuilder X

代码

DOCTYPE html>

<html>
	<head>
		<meta charset="utf-8">
		<title>title>
		
		<style>
			table{
				background-color: beige;
			}
			tr:nth-child(even){
				background-color: powderblue;
			}
			tr td:nth-child(3){
				color: red;
			}
			tr:first-child td:first-child{
				font-size: 30px;
			}
			tr:last-child td:last-child{
				font-weight: bold;
			}
		style>
	head>
	
	<body>
		<table border="2" cellspacing='0'>
		    <tr> 
		        <td>sdstd>
		        <td>std>
		        <td>ddtd>
		        <td>sdstd>
		    tr>
		    <tr> 
		        <td>cdtd>
		        <td>sctd>
		        <td>adctd>
		        <td>satd>
		    tr>
		    <tr> 
		        <td>dcdtd>
		        <td>sdastd>
		        <td>sddstd>
		        <td>dtd>
		    tr>
		    <tr> 
		        <td>dsdtd>
		        <td>asdsatd>
		        <td>ddsvtd>
		        <td>sdtd>
		    tr>
		    <tr> 
		        <td>ssatd>
		        <td>sdtd>
		        <td>sadtd>
		        <td>vdstd>
		    tr>
		    <tr> 
		        <td>sadtd>
		        <td>ssatd>
		        <td>dtd>
		        <td>sdsatd>
		    tr>
		table>
	body>
html>

运行结果

CSS练习_第1张图片

你可能感兴趣的:(前端,css,前端)