这是我网站的代码,CSS基本上是<style></style>
,即使它是原始样式表中的外部样式表:
<link rel="stylesheet" type="text/css" href="magazinetheme.css">
这是代码:
<TITLE>A Guide Book on Tourism</TITLE>
<style>
div {
background-color: lightgrey;
width: 300px;
border: 5.2px solid green;
padding: 25px;
margin: 25px;
font-family: Arial, sans-serif;
font-size: 14px;
float: left;
}
.div1 {
background-color: lightgrey;
width: 500px;
border: 2px solid red;
height: auto;
padding: 25px;
margin: 25px;
font-family: Arial, sans-serif;
font-size: 12px;
float: left;
}
.div2 {
background-color: #FFF;
width: 300px;
border: 2px solid red;
padding: 25px;
margin: 25px;
font-family: Arial, sans-serif;
font-size: 12px;
float: left;
}
img.auto {
width: 425px;
margin-left: auto;
margin-right: auto;
}
.datetime {
font-style: oblique;
}
.wv {
display: block;
}
</style>
<div>
</div>
<div class="div1">
<article><H1>My page</H1>
<p><span class="datetime">02 Jul 2016</span></p>
<section class="wv"><img class="auto" src="placeholderpic.jpg"></section>
</article>
<p>Your text here</p>
</div>
<div class="div2">
</div>
CSS运作良好-但我想添加标题,并且通常更像此站点那样添加CSS:with links in header and a menu。
如何改进CSS以创建一个菜单/标题,该菜单/标题可以带有一些基本的JavaScript下拉菜单,并且与较旧的浏览器兼容? [我在OS X El Capitan 10.11.5上的Firefox上有User Agent Switcher进行测试]。
我曾经考虑过使用jQuery,但不确定它是否适用于较旧的浏览器。
基本上-我想修复布局,使其看起来更像博客或杂志,同时保留适用于Windows,Linux和Mac OS X上的旧版浏览器的向后兼容性。这是基于PHP的网站,但它是模板/布局独立创建; PHP博客是我从基础网站教程开始致力于创建自己的PHP博客的一个博客。
最佳答案
根据您提供的信息,我建议您使用WordPress之类的平台,然后寻找一个与您想要的外观相近的免费主题,从而调整最适合您的外观。
关于javascript - 如何修复CSS并使网站看起来像博客或杂志一样?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/38165228/