图片和文字应位于中心。文本转到中心但图像位于文本顶部。我希望文本和图像以相同的方式,但只在中心。提前致谢
以下是我的代码:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class='col-md-12-fluid' style="
padding-bottom: 2px;
background-color:#7E8F7C;
">
<div class "row" style="background-color:red !important">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html"></a>
</div>
<div class='col-md-4-fluid' style="background-color:#3B3738; height:25px;">
<h3>Nepal Safety</h3>
</div>
</div>
<div class="row">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html">
<img src="images/iccn.png" height="50px" width="100px">
</a>
</div>
<br>
<div class='col-md-4-fluid'>
<h3>Nepal Safety</h3>
</div>
</div>
</div>
<div class='clearfix'></div>
<div class="navbar-header">
答案 0 :(得分:2)
这是:
library(caret)
library(doParallel)
data("environmental")
registerDoParallel(makeCluster(detectCores(), outfile = ''))
mape <- function(y, yhat) mean(abs((y - yhat)/y))
mapeSummary <- function (data, lev = NULL, model = NULL) {
out <- mape(data$obs, data$pred)
names(out) <- "MAPE"
out
}
#LOOCV - parallel
trControlLoocvPar <- trainControl(allowParallel = T,
verboseIter = T,
method = "LOOCV",
summaryFunction = mapeSummary)
#LOOCV - serial
trControlLoocvSer <- trainControl(allowParallel = F,
verboseIter = T,
method = "LOOCV",
summaryFunction = mapeSummary)
#Bootstrapping - parallel
trControlBootPar <- trainControl(allowParallel = T,
verboseIter = T,
method = "boot",
summaryFunction = mapeSummary)
#Bootstrapping - serial
trControlBootSer <- trainControl(allowParallel = F,
verboseIter = T,
method = "boot",
summaryFunction = mapeSummary)
trControlList <- list(trControlLoocvSer,
trControlLoocvPar,
trControlBootSer,
trControlBootPar)
models <- lapply(trControlList,
function(control) {
train(y = environmental$ozone,
x = environmental[, -1],
method = "glmnet",
trControl = control,
metric = "MAPE",
maximize = FALSE)
})
&#13;
答案 1 :(得分:0)
这应该有效:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class='col-md-12-fluid' style="
padding-bottom: 2px;
background-color:#7E8F7C;
">
<div class="row" style="background-color:red !important">
<div class='col-md-8-fluid'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html"></a>
</div>
<div class='col-md-4-fluid' style="background-color:#3B3738; height:25px;">
<h3>Nepal Safety</h3>
</div>
</div>
<div class="row">
<div class='col-md-6'>
<!--recently search was here-->
<a class="navbar-brand" href="index.html" style="float:right;">
<img src="images/iccn.png" height="50px" width="100px">
</a>
</div>
<br>
<div class='col-md-6'>
<h3>Nepal Safety</h3>
</div>
</div>
</div>
<div class='clearfix'></div>
<div class="navbar-header">
我将列更改为6和6,使它们的宽度都是屏幕的一半。我删除了&#34;流体&#34;从列类中(因为你已经将包含的div设置为流畅的,你不需要任何子流体)。最后,我将图像浮动,使其位于标题旁边。
告诉我这是不是你要找的东西!