
<form>
<input type="password" value="nowcoder">input>
<input type="checkbox" checked>input>
form>


<table>
<caption>nowcodercaption>
<tr>
<td>td>
<td>td>
<td>td>
tr>
<tr>
<td>td>
<td>td>
<td>td>
tr>
table>

<img alt="" title="">img>

<a href="#" target="_blank">FFa>

<dl>
<dt>nowcoderdt>
<dd>nowcoderdd>
dl>
<dl>
<dt>Coffeedt>
<dd>- black hot drinkdd>
<dt>Milkdt>
<dd>- white cold drinkdd>
dl>

<p><strong>牛客网strong>,程序员必备求职神器p>
-加粗strong

<header>
<nav>nav>
header>



<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
div{
color:rgb(255, 0, 0);
font-size:20px;
}
#black{
color:rgb(0, 0, 0);
}
.green{
color:rgb(0, 128, 0);
}
style>
head>
<body>
<div>红色div>
<div class='green'>绿色div>
<div id='black'>黑色div>
body>
html>

<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
ul li:nth-child(2),ul li:nth-child(4){
background-color:rgb(255,0,0);
}
style>
head>
<body>
<ul>
<li>1li>
<li>2li>
<li>3li>
<li>4li>
ul>
body>
html>


<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
div::after{
content: "";
width:20px;
height:20px;
background-color:rgb(255, 0, 0);
display:block;
}
style>
head>
<body>
<div>div>
body>
html>

<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
div{
border: 1px solid black;
width:100px;
height:100px;
border-radius:50px;
}
style>
head>
<body>
<div>div>
body>
html>


<html>
<head>
<meta charset=utf-8>
<style type="text/css">
/*补全代码*/
.box{
width:100px;
height:100px;
margin:10px;
padding:20px;
}
style>
head>
<body>
<div class="box">
div>
body>
html>


<html>
<head>
<meta charset=utf-8>
<style type="text/css">
.wrap {
/*补全代码*/
overflow:hidden;
}
.left {
width: 100px;
height: 100px;
/*补全代码*/
float:left;
}
.right {
width: 100px;
height: 100px;
/*补全代码*/
float:left
}
style>
head>
<body>
<div class='wrap'>
<div class='left'>div>
<div class='right'>div>
div>
body>
html>

<html>
<head>
<meta charset=utf-8>
<style type="text/css">
.box {
width: 100px;
height: 100px;
/*补全代码*/
position:fixed;
top:0px;
left:0px;
}
style>
head>
<body>
<div class='box'>div>
body>
html>


<p>牛客网是一个专注于程序员的学习和成长的专业平台。p>

<p >欢迎来到牛客网p>
<p>在这里,我们为你提供了IT名企的笔试面试题库p>
<p>在这里,我们以题会友p>
<style>
p{
color:red
}
style>

DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<style type="text/css">
.topbranch {
width: 0px;
height: 0px;
/*
* TODO: 上枝叶效果
*/
float: left;
border-bottom: 100px solid green;
border-top: 100px solid transparent;
border-left:100px solid transparent;
border-right:100px solid transparent;
margin-left: 100px;
}
.middleBranch {
width: 0px;
height: 0px;
/*
* TODO: 中枝叶效果
*/
border-top: 200px solid transparent;
border-bottom: 200px solid green;
border-left:200px solid transparent;
border-right:200px solid transparent;
}
.base {
/*
* TODO: 树干效果
*/
height: 200px;
width: 70px;
background-color: gray;
margin-left: 165px;
}
style>
head>
<body>
<section class="topbranch">section>
<section class="middleBranch">section>
<section class="base">section>
body>
html>



<html>
<head>
<meta charset=utf-8>
<style type="text/css">
.box {
/*补全代码*/
width: 4em;
height: 4em;
}
style>
head>
<body>
<div class='box'>div>
body>
html>

在css中单位长度用的最多的是px、em、rem,这三个的区别是:
- px是固定的像素,一旦设置了就无法因为适应页面大小而改变。
- em和rem相对于px更具有灵活性,他们是相对长度单位,意思是长度不是定死了的,更适用于响应式布局。
- 对于em和rem的区别一句话概括:em相对于父元素,rem相对于根元素。