当我将 Chrome 中的CSSbackground-color属性实现到正文中时,它不起作用。然而,当我在CodePen中测试它时,正文的背景颜色会相应改变。以下是 CodePen 代码的链接: https: //codepen.io/Ag_Yog/pen/rzezYw。
这是在记事本中不起作用的代码:
HTML:
<html>
<head>
<link rel="stylesheet" type="text/css" href="main.css">
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Acme" rel="stylesheet">
<title></title>
</head>
<body>
<div class="container quoteCard">
<p id="quote" class= "text">Txt</p>
<button class = "btn getQuote ">Get new Quote</button>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src = "main.js"></script>
</body>
Run Code Online (Sandbox Code Playgroud)
CSS:
html, body {
width: 100%;
height: 100%;
background-color: #00e676 ;
}
.quoteCard{
background-color: #fff176;
}
.text{
position: relative;
vertical-align:middle;
font-family: 'Acme', sans-serif;
font-size: 30px;
padding: 20px 20px …Run Code Online (Sandbox Code Playgroud) 我的程序应该将数字输出为单词.例如输入10.输出TEN.除了十点之外,我输入的所有其他数字都是正确的.我只需要帮助来解决这个问题.任何帮助将不胜感激.当我输入10时,它显示为空白.
我的代码: