wordpress的style.css
时间 : 2024-01-03 13:24:02 声明: : 文章内容来自网络,不保证准确性,请自行甄别信息有效性

最佳答案

/*

Theme Name: WordPress Style

Theme URI: https://www.example.com

Author: Your Name

Author URI: https://www.example.com/author

Description: This is the style.css file for the WordPress Style theme.

Version: 1.0

License: GNU General Public License v2 or later

License URI: http://www.gnu.org/licenses/gpl-2.0.html

Tags: responsive, blog, clean, modern

*/

/* Reset styles */

html,

body,

div,

span,

applet,

object,

iframe,

h1,

h2,

h3,

h4,

h5,

h6,

p,

blockquote,

pre,

a,

abbr,

acronym,

address,

big,

cite,

code,

del,

dfn,

em,

font,

img,

ins,

kbd,

q,

s,

samp,

small,

strike,

strong,

sub,

sup,

tt,

var,

b,

u,

i,

center,

dl,

dt,

dd,

ol,

ul,

li,

fieldset,

form,

label,

legend,

table,

caption,

tbody,

tfoot,

thead,

tr,

th,

td {

margin: 0;

padding: 0;

border: 0;

font-weight: inherit;

font-style: inherit;

font-size: 100%;

font-family: inherit;

vertical-align: baseline;

}

/* Global styles */

body {

font-family: Arial, sans-serif;

font-size: 16px;

color: #333;

line-height: 1.5;

background-color: #fff;

}

a {

color: #007bff;

text-decoration: none;

}

a:hover {

text-decoration: underline;

}

h1,

h2,

h3,

h4,

h5,

h6 {

color: #333;

margin-bottom: 20px;

}

p {

margin-bottom: 16px;

}

img {

margin-bottom: 16px;

}

/* Header styles */

header {

background-color: #f5f5f5;

padding: 20px;

}

.site-title {

font-size: 24px;

margin-bottom: 10px;

}

.site-description {

font-size: 18px;

color: #888;

margin-bottom: 10px;

}

/* Navigation styles */

.navbar {

background-color: #007bff;

padding: 10px 20px;

}

.navbar ul {

list-style-type: none;

margin: 0;

padding: 0;

display: flex;

align-items: center;

}

.navbar li {

margin-right: 20px;

}

.navbar a {

color: #fff;

font-size: 16px;

}

.navbar a:hover {

color: #f5f5f5;

}

/* Content styles */

.content {

padding: 20px;

}

/* Footer styles */

footer {

background-color: #f5f5f5;

padding: 20px;

text-align: center;

color: #888;

font-size: 14px;

}

/* Responsive styles */

@media screen and (max-width: 768px) {

.navbar {

flex-direction: column;

padding: 10px;

}

.navbar li {

margin-bottom: 10px;

}

}

其他答案

/*

Theme Name: WordPress Theme

Theme URI: https://www.example.com/

Author: Your Name

Author URI: https://www.example.com/

Description: A custom WordPress theme.

Version: 1.0.0

License: GNU General Public License v2 or later

License URI: https://www.gnu.org/licenses/gpl-2.0.html

Tags: blog, responsive, custom

Main Style Sheet

*/

/* Reset Styles

-------------------------------------------------------------- */

html,

body,

div,

span,

h1,

h2,

h3,

h4,

h5,

h6,

p,

blockquote,

pre,

a,

abbr,

acronym,

address,

big,

cite,

code,

del,

dfn,

del,

em,

font,

img,

ins,

kbd,

q,

s,

samp,

small,

strike,

strong,

sub,

sup,

tt,

var,

b,

u,

i,

center,

dl,

dt,

dd,

ol,

ul,

li,

fieldset,

form,

label,

legend,

caption,

tbody,

tfoot,

thead,

tr,

th,

td {

margin: 0;

padding: 0;

border: 0;

outline: 0;

font-size: 100%;

vertical-align: baseline;

background: transparent;

}

/* Global Styles

-------------------------------------------------------------- */

body {

font-family: Arial, sans-serif;

font-size: 16px;

line-height: 1.5;

color: #333;

background-color: #fff;

}

h1, h2, h3, h4, h5, h6 {

margin: 10px 0;

font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

font-weight: bold;

color: #333;

}

a {

color: #007bff;

text-decoration: none;

}

a:hover {

color: #0056b3;

text-decoration: underline;

}

img {

max-width: 100%;

height: auto;

}

/* Layout Styles

-------------------------------------------------------------- */

.container {

width: 960px;

margin: 0 auto;

padding: 20px;

}

.header {

margin-bottom: 20px;

text-align: center;

}

.menu {

margin-bottom: 20px;

}

.menu ul {

list-style: none;

text-align: right;

}

.menu li {

display: inline-block;

margin-left: 10px;

}

.content {

margin-bottom: 20px;

}

.sidebar {

width: 300px;

float: right;

}

.footer {

margin-top: 20px;

text-align: center;

}

/* Media Queries

-------------------------------------------------------------- */

@media screen and (max-width: 768px) {

.container {

width: 100%;

padding: 10px;

}

.sidebar {

width: 100%;

float: none;

}

}

/* Custom Styles

-------------------------------------------------------------- */

/* Add your custom styles below this comment */