标签:lin css 颜色 view 简单的 blank title span round
文章地址:https://www.cnblogs.com/sandraryan/
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> p{ margin: 0; line-height: 26px; } </style> </head> <body> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <p>this is a sentence.</p> <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script> <script> // p中的奇数行偶数行设置不同的颜色 $("p:odd").css("backgroundColor","white"); $("p:even").css("backgroundColor","lightblue"); </script> </body> </html>
标签:lin css 颜色 view 简单的 blank title span round
原文地址:https://www.cnblogs.com/sandraryan/p/11762059.html