我正在学习HTML和CSS.现在我试图创建一个简单的布局,HEADER低于A MENU BAR,右下方的导航栏和右侧的MAIN SECTION不能将导航栏和主要部分并排放置.
主要部分位于导航栏下方,而不是侧面
The code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<center>
<div style="height:70px; width:800px; background-color:red; color:white; font-size:30px" align="center">
<strong>WELCOME</strong>
</div>
<div style="height:30px; width:800px; background-color:blue; color:white; font-size:15px; top:80px" align="center">
<div style="width:200px; float:left">
<a href="">HOME</a>
</div>
<div style="width:200px; float:left">
<a href="C:\Users\Harish\Desktop\c prog.html">liwjoejlsn</a>
</div>
<div style="width:200px; float:left">
<a href="">lskdjflsd</a>
</div>
<div style="width:200px; float:left">
<a href="">ABOUT</a>
</div>
</div>
</center>
<center>
<div style="height:800px; width:800px; background-color:grey; color:white; font-size:10px; top:100px"> …Run Code Online (Sandbox Code Playgroud) 我期待以下程序的答案为400 ......但为什么它是120?
#include<stdio.h>
#define N 10+10
int main()
{
int a = N*N;
printf("%d", a);
}
Run Code Online (Sandbox Code Playgroud)