我有以下 html 标记,目前只显示带有一些样式的简单文本“HELLO STACKOVERFLOW”。标记取自 illustrator,我正在尝试合并 bootstrap 以制作更具响应性的页面。我不明白为什么文本不会随着浏览器大小而改变。好像固定了浏览器显示 Bootstrap 脚本正在运行,但我无法弄清楚是什么覆盖了 Bootstrap 。代码中的样式只是文本大小和颜色。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=1190,height=792" />
<title>5707.CC2014.R30TEST2-1</title>
<link href="css/idGeneratedStyles.css" rel="stylesheet" type="text/css" />
<script src="script/idGeneratedScript.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous" />
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
</head>
<body id="x5707.CC2014.R30TEST2-1" onload="RegisterInteractiveHandlers();" lang="en-GB" xml:lang="en-GB" style="width:1190px;height:792px">
<div class="container">
<div class="row">
<div class="col-lg-6" style="width:13883.54px;height:2339.22px;position:absolute;top:0px;left:0px;-webkit-transform-origin: 0% 0%; -webkit-transform: translate(0px,45.2px) rotate(0deg) scale(0.05);transform-origin: 0% 0%; transform: translate(0px,45.2px) rotate(0deg) scale(0.05);">
<p class="Basic-Paragraph ParaOverride-1"><span id="_idTextSpan000" class="CharOverride-1" style="position:absolute;top:-470.32px;left:0px;letter-spacing:15.4px;">HELLO STACKOVERFLOW</span></p>
</div>
</div>
</div>
</body>
</html>
最佳答案
两个评论都恰到好处。您从生成器(上面写的 Illustrator,尽管样式样式表是 InDesign 样式表)获得了此代码。生成器经常添加内联样式。这也是这里发生的事情。只需从您的 body 元素中删除所有 style="[css-rules]"
属性即可。
关于javascript - Bootstrap 不适用于简单的 html 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34616036/