【发布时间】:2014-10-23 15:04:45
【问题描述】:
基多克。
所以我有内部风格问题。使用 WordPress。经过许多令人沮丧的时间试图弄清楚如何更改几个不同项目的样式后,我发现主 html 文件有大量的内部样式表。他们覆盖了我在我的 Wordpress 主题的 style.css 文件中输入的样式。
样式在网页的<head> 内。我需要知道我可以去哪里编辑这些内部样式。也就是说,什么模板文件保存它们?
有很多代码,但这里是相关的东西。样式在底部。我删除了实际样式。我只需要找出如何编辑它们。显然,它们必须在 Wordpress php 文件中。但是是哪一个?
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Trailogy | Find the Trail. Hit the Trail</title><meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, minimum-scale=1.0, maximum-scale=3.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="http://localhost/wordpress/xmlrpc.php" />
<link rel="shortcut icon" href="http://localhost/wordpress/wp- content/uploads/2014/10/LogoThumbFav.png" /><link rel="apple-touch-icon" href="http://localhost/wordpress/wp-content/uploads/2014/10/LogoThumbFav.png" /><link rel="alternate" type="application/rss+xml" title="Trailogy » Feed" href="http://localhost/wordpress/feed/" />
<link rel="alternate" type="application/rss+xml" title="Trailogy » Comments Feed" href="http://localhost/wordpress/comments/feed/" />
<link rel='stylesheet' id='nirvanas-css' href='http://localhost/wordpress/wp-content/themes/nirvana/style.css?ver=4.0' type='text/css' media='all' />
<script type='text/javascript' src='http://localhost/wordpress/wp-includes/js/jquery/jquery.js?ver=1.11.1'></script>
<script type='text/javascript' src='http://localhost/wordpress/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<script type='text/javascript' src='http://localhost/wordpress/wp-content/themes/nirvana/js/frontend.js?ver=4.0'></script>
<script type='text/javascript' src='http://localhost/wordpress/wp-content/themes/nirvana/js/nivo-slider.js?ver=4.0'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/wordpress/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/wordpress/wp-includes/wlwmanifest.xml" />
<meta name="generator" content="WordPress 4.0" />
<script type="text/javascript">
jquery stuff for a slider.
</script>
<style type="text/css"> /*Hundreds of lines of css*/</style>
<style type="text/css">/* Nirvana Custom CSS */</style>'
顺便说一句,STYLE.CSS 不会覆盖这些内部样式!这就是问题所在。
编辑:为什么是我?是的,所以在花了一整天的时间试图弄清楚这一点之后,我的同事站起来说:“伙计,你可以在你的样式末尾添加!important,它们会覆盖所有内容。”所以我创建了一个样式覆盖 css 表。说说让我眼前一亮的解决方案!
【问题讨论】:
-
我们怎么可能不看源代码就知道这一点?请在您的问题中包含代码。
标签: html css wordpress templates