因此,我正在構建一個網站,我希望在右側有一些小標籤,可以更改主頁上的內容,而無需刷新整個頁面,就像主頁面中的嵌入式頁面一樣。我正在使用模板(HTML和CS)並嘗試修改現有內容。在代碼中,您可以注意到有一個定義按鈕的有序列表(如主頁等),當它們盤旋時,它們改變背景並看起來很花哨,但它們實際上並沒有做任何事情。我一直在閱讀如何讓他們改變頁面(通過下面的鏈接),但我很困惑,不知道如何去做。我希望你們能幫助我。我對HTML和CSS非常不感興趣,只是試圖把東西放在一起,並從示例中學習,同時也構建了一個私有網站。提前謝謝你的幫助!有序列表Html頁面選項卡在同一頁面打開網頁
INDEX.HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>/rootbox</title>
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Abel' rel='stylesheet' type='text/css'>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="header-wrapper">
<div id="header" class="container">
<div id="logo">
<h1><a href="#">Rootbox</a></h1>
</div>
<div id="menu">
<ul>
<li class="current_page_item"><a href="#">Homepage</a></li>
<li><a href="#">Distros</a></li>
<li><a href="#">Wifi</a></li>
<li><a href="#">Tools</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
</div>
<div id="banner">
<div class="content"><img src="images/title.png" width="1000" height="300" alt="" /></div>
</div>
</div>
<!-- end #header -->
<div id="page">
<div id="content">
<div class="post">
<h2 class="title"><a href="#">Welcome to /rootbox</a></h2>
<div style="clear: both;"> </div>
<div class="entry">
<p>/rootbox is a collection of Security oriented Tools, Tutorials, Resources and Websites.This site offers a collection of well documented and freely available tools and resources for both a begginer pen-tester and the professional white-hat. Everything on this site is simply a collection, thus no original content is posted. All links have been tested and properly checked for security. All software published here is free and available directly from the author's site. Tutorials are often updated and deprecated software is removed.
</br></br>
This site is hosted on Panckake.io - A web framework which allows for publishing websites directly from Dropbox. For more information go <a href="http://pancake.io">here</a>.If you need any additional help, or have any feedback or suggestions, send an email to [email protected]
</p>
</div>
</div>
</div>
</div>
<!-- end #content -->
</div>
<div id="footer">
<p>Copyright (c) 2012. All rights reserved. Design by <a href="http://www.freecsstemplates.org">FCT</a></p>
</div>
<!-- end #footer -->
</body>
</html>
的style.css
body {
margin: 0;
padding: 0;
background: #050505 url(images/img01.jpg) repeat;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #5B5B5B;
}
h1, h2, h3 {
margin: 0;
padding: 0;
text-transform: uppercase;
font-weight: normal;
font-family: 'Oswald', sans-serif;
font-weight: 200;
color: #222222;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 2.8em;
}
h3 {
font-size: 1.6em;
}
p, ul, ol {
margin-top: 0;
line-height: 180%;
}
ul, ol {
}
a {
color: #5E5E5E;
}
a:hover {
}
#wrapper {
background: #FFFFFF url(images/img05.jpg) repeat;
}
.container {
width: 1000px;
margin: 0px auto;
}
/* Header */
#header-wrapper {
overflow: hidden;
}
#header {
width: 1000px;
height: 150px;
margin: 0 auto;
padding: 0px 0px;
}
/* Logo */
#logo {
float: left;
width: 300px;
margin: 0;
padding: 0;
color: #FFFFFF;
}
#logo h1, #logo p {
}
#logo h1 {
line-height: 120px;
letter-spacing: -2px;
font-size: 3.8em;
}
#logo h1 a {
color: #1F1F1F;
text-shadow: 1px 1px 0px rgba(0,0,0,.2);
}
#logo p {
margin: 0;
padding: 0px 0 0 0px;
letter-spacing: -1px;
font: normal 18px Georgia, "Times New Roman", Times, serif;
font-style: italic;
color: #8E8E8E;
}
#logo p a {
color: #8E8E8E;
}
#logo a {
border: none;
background: none;
text-decoration: none;
color: #000000;
}
/* Splash */
#splash {
width: 960px;
height: 300px;
margin: 0px auto;
}
/* Search */
#search {
float: right;
width: 280px;
height: 60px;
padding: 20px 0px 0px 0px;
}
#search form {
height: 41px;
margin: 0;
padding: 10px 0 0 20px;
}
#search fieldset {
margin: 0;
padding: 0;
border: none;
}
#search-text {
width: 170px;
padding: 6px 5px 2px 5px;
border: 1px solid #E7EBED;
background: #FFFFFF;
text-transform: lowercase;
font: normal 11px Arial, Helvetica, sans-serif;
color: #5D781D;
}
#search-submit {
width: 50px;
height: 22px;
border: none;
background: #B9B9B9;
color: #000000;
}
/* Menu */
#menu {
float: right;
width: 500px;
height: 90px;
margin: 0 auto;
padding: 0;
}
#menu ul {
float: right;
margin: 0;
padding: 20px 0px 0px 0px;
list-style: none;
line-height: normal;
}
#menu li {
float: right;
}
#menu a {
display: block;
line-height: 100px;
margin-right: 1px;
padding: 0px 20px 0px 20px;
text-decoration: none;
text-align: center;
text-shadow: 1px 1px 0px rgba(0,0,0,.2);
text-transform: uppercase;
font-family: 'Oswald', sans-serif;
font-size: 16px;
font-weight: 300;
color: #1F1F1F;
border: none;
}
#menu a:hover, #menu .current_page_item a {
background: url(images/img01.jpg) repeat;
text-decoration: none;
color: #FFFFFF;
}
#menu .current_page_item a {
}
/* Page */
#page {
width: 1000px;
margin: 0 auto;
padding: 30px 0px;
}
/* Content */
#content {
padding: 0px 0px 0px 0px;
}
.post {
overflow: hidden;
margin-bottom: 40px;
border-bottom: 1px solid #E7EBED;
}
.post .title {
padding: 0px 0px 0px 0px;
letter-spacing: -1px;
}
.post .title a {
border: none;
text-decoration: none;
color: #222222;
}
.post .meta {
margin-bottom: 30px;
padding: 10px 0px 0px 0px;
text-align: left;
font-family: 'Abel', sans-serif;
font-size: 16px;
font-weight: 300;
}
.post .meta .date {
float: left;
}
.post .meta .posted {
float: right;
}
.post .meta a {
}
.post .entry {
padding: 0px 0px 40px 0px;
text-align: justify;
}
.links {
padding-top: 20px;
margin-bottom: 30px;
}
.more {
display: block;
float: left;
width: 88px;
padding: 5px 5px;
margin-right: 10px;
background: #222222;
color: #FFFFFF;
text-align: center;
text-decoration: none;
}
.comments {
display: block;
float: left;
width: 88px;
padding: 5px 5px;
background: #222222;
color: #FFFFFF;
text-align: center;
text-decoration: none;
}
/* Sidebar */
#sidebar {
float: left;
width: 270px;
margin: 0px;
padding: 30px 0px 0px 0px;
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar li {
margin: 0;
padding: 0;
}
#sidebar li ul {
margin: 0px 0px;
padding-bottom: 30px;
}
#sidebar li li {
line-height: 40px;
border-bottom: 1px solid #E7EBED;
margin: 0px 0px;
border-left: none;
}
#sidebar li li span {
display: block;
margin-top: -20px;
padding: 0;
font-size: 11px;
font-style: italic;
}
#sidebar li li a {
padding: 0px 0px 0px 20px;
background: url(images/img04.jpg) no-repeat left 50%;
}
#sidebar h2 {
height: 38px;
padding: 0px 0px 30px 0px;
letter-spacing: -.5px;
font-size: 1.8em;
color: #222222;
}
#sidebar p {
margin: 0 0px;
padding: 0px 30px 20px 30px;
text-align: justify;
}
#sidebar a {
border: none;
}
#sidebar a:hover {
text-decoration: underline;
}
/* Calendar */
#calendar {
}
#calendar_wrap {
padding: 20px;
}
#calendar table {
width: 100%;
}
#calendar tbody td {
text-align: center;
}
#calendar #next {
text-align: right;
}
/* Three Column Footer Content */
#footer-content {
overflow: hidden;
width: 1000px;
margin: 0px auto;
color: #D6E2F0;
}
#footer-content a {
color: #92A9B6;
}
#footer-bg {
overflow: hidden;
padding: 30px 0px;
background: #E8E8E8;
}
#footer-content h2 {
margin: 0px;
padding: 0px 0px 20px 0px;
letter-spacing: -1px;
font-size: 26px;
color: #262626;
}
#footer-content #fbox1 {
float: left;
width: 300px;
margin-right: 50px;
}
#footer-content #fbox2 {
float: left;
width: 300px;
}
#footer-content #fbox3 {
float: right;
width: 300px;
}
#footer-content a {
}
#column1 {
float: left;
width: 290px;
margin-right: 30px;
}
#column2 {
float: left;
width: 280px;
}
#column3 {
float: right;
width: 260px;
}
/* Footer */
#footer {
height: 140px;
margin: 0 auto;
padding: 50px 0 15px 0;
font-family: 'Abel', sans-serif;
}
#footer p {
margin: 0;
padding-top: 10px;
letter-spacing: 1px;
line-height: normal;
font-size: 14px;
text-transform: uppercase;
text-align: center;
color: #5E5E5E;
}
#footer a {
color: #5E5E5E;
}
#marketing {
overflow: hidden;
margin-bottom: 30px;
padding: 20px 0px 10px 0px;
border-top: 1px solid #E7EBED;
border-bottom: 1px solid #E7EBED;
}
#marketing .text1 {
float: left;
margin: 0px;
padding: 0px;
letter-spacing: -2px;
text-transform: lowercase;
font-size: 34px;
color: #345E9B;
}
#marketing .text2 {
float: right;
}
#marketing .text2 a {
display: block;
width: 252px;
height: 38px;
padding: 15px 0px 0px 0px;
background: url(images/img07.jpg) no-repeat left top;
letter-spacing: -2px;
text-align: center;
text-transform: lowercase;
font-size: 30px;
color: #FFFFFF;
}
#banner {
margin: 0px auto;
width: 1000px;
height: 340px;
background: url(images/img03.png) no-repeat left bottom;
}
#banner .content {
}
.list-style1 {
margin: 0px;
padding: 0px;
list-style: none;
}
.list-style1 a {
color: #7F7F7F;
}
你問在用戶懸停在鏈接上時如何製作頁面重定向? – TNCodeMonkey
實際上,我不想打包來點擊其中一個標籤,其餘的頁面將被重定向到另一個頁面。讓我直觀地展示給你: 這是主頁:http://i.imgur.com/Lv1T7.png 當我點擊,讓我們說,發行版按鈕,你會得到這個:http://我。 imgur.com/Qzekt.png –
我明白你的意思。在jsfiddle.net上做一個jsfiddle幷包含有問題的元素,然後我可以幫助您在協作論壇中解決您的問題。儘量減少顯示的代碼,以便閱讀更容易,未來的問題很可能會產生更好的結果。 –