首页  > 前端开发 > css外部款式,```html External CSS Example My Website Home About Contact

css外部款式,```html External CSS Example My Website Home About Contact

前端开发 2024-12-23 2

下面是一个CSS外部款式的示例:

1. 创立一个CSS文件,例如`styles.css`,并在其间界说款式规矩:

```css/ styles.css /body { fontfamily: Arial, sansserif; backgroundcolor: f4f4f4;}

header { backgroundcolor: 333; color: fff; padding: 10px 0;}

nav ul { liststyletype: none; margin: 0; padding: 0;}

nav ul li { display: inline; marginright: 10px;}

nav a { textdecoration: none; color: fff;}

nav a:hover { textdecoration: underline;}

footer { backgroundcolor: 333; color: fff; textalign: center; padding: 10px 0; position: absolute; bottom: 0; width: 100%;}```

```html External CSS Example My Website Home About Contact

Welcome to my website!

Copyright


Copyright © 2016-2028零基础教程 Rights Reserved. XML地图