标签:content pre 包括 back class doctype idt html utf-8
直接在代码里理解
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>demo</title> <style type="text/css" media="screen"> .d1{ width:300px; height:150px; border:1px solid #000; padding:10px; /*box-sizing:border-box; 规定宽和高从border开始算起*/ /*box-sizing:content-box; 默认 规定宽和高只是content部分不包括padding和border*/ } .d2{ width:100%; height:100%; background: red; } </style> </head> <body> <div class="d1"> <div class="d2"> </div> </div> </body> </html>
标签:content pre 包括 back class doctype idt html utf-8
原文地址:https://www.cnblogs.com/xuwupiaomiao/p/12099508.html