Home php c# sql c c++ javascript python java go android git linux asp.net django .net node.js ios xcode cocoa iphone mysql tomcat mongodb bash objective-c scala visual-studio apache elasticsearch jar eclipse jquery ruby-on-rails ruby rubygems android-studio spring lua sqlite emacs ubuntu perl docker swift amazon-web-services svn html ajax xml java-ee maven intellij-idea rvm macos unix css ipad postgresql css3 json windows-server vue.js typescript oracle hibernate internet-explorer github tensorflow laravel symfony redis html5 google-app-engine nginx firefox sqlalchemy lucene erlang flask vim solr webview facebook zend-framework virtualenv nosql ide twitter safari flutter bundle phonegap centos Register | Login | Edit Tags | New Questions | 繁体 | 简体


10 questions online user: 21

0
votes
answers
10 views
+10

頂部導航欄去側面導航欄

0

我目前正在使用稱爲'儀表板'的引導程序的示例我想獲得頂部導航欄實際上藏在側面導航欄下面。喜歡這個例子:Image Example from Dribbble頂部導航欄去側面導航欄

我已經把儀表板代碼從bootstrap放到jsfiddle中,以方便那些願意幫助的用戶(我真的很感謝任何幫助)。 https://jsfiddle.net/1dy65wqx/

應該影響本:

<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark"> 
    <a class="navbar-brand" href="#">Dashboard</a> 
    <button class="navbar-toggler d-lg-none" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> 
     <span class="navbar-toggler-icon"></span> 
    </button> 

    <div class="collapse navbar-collapse" id="navbarsExampleDefault"> 
     <ul class="navbar-nav mr-auto"> 
     <li class="nav-item active"> 
      <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Settings</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Profile</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Help</a> 
     </li> 
     </ul> 
     <form class="form-inline mt-2 mt-md-0"> 
     <input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search"> 
     <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button> 
     </form> 
    </div> 
    </nav> 
</header> 

<div class="container-fluid"> 
    <div class="row"> 
    <nav class="col-sm-3 col-md-2 d-none d-sm-block bg-light sidebar"> 
     <ul class="nav nav-pills flex-column"> 
     <li class="nav-item"> 
      <a class="nav-link active" href="#">Overview <span class="sr-only">(current)</span></a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Reports</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Analytics</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Export</a> 
     </li> 
     </ul> 

     <ul class="nav nav-pills flex-column"> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Nav item</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Nav item again</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">One more nav</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Another nav item</a> 
     </li> 
     </ul> 

     <ul class="nav nav-pills flex-column"> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Nav item again</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">One more nav</a> 
     </li> 
     <li class="nav-item"> 
      <a class="nav-link" href="#">Another nav item</a> 
     </li> 
     </ul> 
    </nav> 
沙发
0
0

我已經改變了一些款式,請添加到您的css文件..

<div class="row" style="position:relative;"> 
     <nav class="col-sm-3 col-md-2 d-none d-sm-block bg-light sidebar" style="position:fixed; z-index:2000; top:0px;"> 
0
votes
answers
9 views
+10

Bootstrap 4 - 將圖像裁剪成圓形 - 風景照片未被正確裁剪

0

我試圖將任何尺寸的照片裁剪成120 x 120像素。 Bootstrap不會帶有很好的圓形裁剪,所以我使用bootstrap 4的img-fluidoverflow:hidden + border-radius的組合來實現此目的。Bootstrap 4 - 將圖像裁剪成圓形 - 風景照片未被正確裁剪

這適用於人像照片(高度>寬度),但對於風景照片like this,結果is this

HTML:

<div style="overflow:hidden; height:120px; width:120px; border-radius:50%;"> 
    <img class="img-fluid" src="picture.png" alt='Agent picture' /> 
</div> 

如何剪裁風景照片是否正確?

沙发
0
1

不知道這是否符合您的需求,但您可以使用background-image屬性來完成此操作。這是一個工作CodePen

HTML:

<div class="agent-image"></div> 

CSS:

.agent-image{ 

    background-image:url("https://i.gyazo.com/da27f072059db48590e3b9da9d7789c2.jpg"); 
    background-position:center; 
    background-size:cover; 
    height: 120px; 
    width: 120px; 
    border-radius: 50%; 

} 
+0

謝謝。這工作。我更喜歡使用,因爲它感覺更自然(可能是一個愚蠢的假設),但是無論什麼作品都有效! – Valachio

+0

可能有辦法讓''得到一個工作,雖然它可能比這更多的工作,也可以使用這個方便的Dandy位置屬性來使用你想要的部分img – infamoustrey

+0

我做了一些工作並意識到很多我的圖像不再是響應大小的,因爲來自Bootstrap的img-fluid(響應性地調整圖像大小)僅適用於''。我要回溯,看看我能否找到解決方案 Valachio

0
votes
answers
8 views
+10

引導3.0的行具有利潤率左15px的利潤率和右15px的

1

引導3.0的行具有利潤率左15px的利潤率和右15px的

<header> 
 
    <div class="container"> 
 
    <div class="row"> 
 
     <div class="col-lg-2 logo"> 
 
     <img src="img/logo.png" alt="Logotype"> 
 
     </div> 
 
     <div class="col-lg-7 col-lg-offset-3"> 
 
     <ul class="menu"> 
 
      <li class="menu-item"><a href="#">Home</a></li> 
 
      <li class="menu-item"><a href="#">About</a></li> 
 
      <li class="menu-item"><a href="#">Expertise</a></li> 
 
      <li class="menu-item"><a href="#">Teams</a></li> 
 
      <li class="menu-item"><a href="#">Works</a></li> 
 
      <li class="menu-item"><a href="#">People say</a></li> 
 
      <li class="menu-item"><a href="#">Contact</a></li> 
 
     </ul> 
 
     </div> 
 
    </div> 
 
    </div> 
 
    <div class="row text-center content-wrapper"> 
 
    <div class="col-lg-12 content-header"> 
 
     <h1 class="title">We Are Awesome Creative Agency</h1> 
 
     <p class="description-header"> 
 
     This is Photoshop's version of Lorem Ipsum. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem<br> quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh<br> vulputate cursus 
 
     a sit amet mauris. Morbi accumsan ipsum velit. 
 
     </p> 
 
     <div class="button"> 
 
     <a class="content-button">LEARN MORE</a> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</header>

我最近開始學習引導,並面臨着這樣一個問題,爲什麼當我創建一個他有一個保證金左/ right 15px,我的屏幕寬度爲1263px,因爲這些字段好像有水平滾動,1293px字段之後,等等每一個新行,如何解決這個問題?

Just my template

Screenshoot my console

+0

向我們展示你的'HTML'和'CSS'。 '.row'中有'.col'嗎?任何'.container'中的'.row'? –

+0

好吧,我發表了它 –

沙发
0
0

嘗試margin-left: 0px;margin-right: 0px。然後將其設置爲margin: 0 auto並將寬度更改爲width: 100%。這可能會有所幫助,如果沒有,我可能需要你的代碼片段來擺弄它。

板凳
0
2

行必須放置在.container(固定寬度)或.container-fluid(全寬度)範圍內才能正確對齊和填充。您必須爲容器提供1263像素的寬度,並且您應該使用行來避免水平滾動。

容器元素的左右兩邊會有15px的填充。行在左右兩邊都會有15px的負邊距,這將包含容器使用的空間(用於填充)。這樣你的行就會在你的屏幕上顯示100%,並避免水平滾動。

+0

我發佈了我的代碼 –

+0

謝謝)我解決了我的問題,只是第二行是在容器外 –

地板
0
0

<header> 
 
    <div class="container"> 
 
    <div class="row"> 
 
     <div class="col-lg-2 logo"> 
 
     <img src="img/logo.png" alt="Logotype"> 
 
     </div> 
 
     <div class="col-lg-7 col-lg-offset-3"> 
 
     <ul class="menu"> 
 
      <li class="menu-item"><a href="#">Home</a></li> 
 
      <li class="menu-item"><a href="#">About</a></li> 
 
      <li class="menu-item"><a href="#">Expertise</a></li> 
 
      <li class="menu-item"><a href="#">Teams</a></li> 
 
      <li class="menu-item"><a href="#">Works</a></li> 
 
      <li class="menu-item"><a href="#">People say</a></li> 
 
      <li class="menu-item"><a href="#">Contact</a></li> 
 
     </ul> 
 
     </div> 
 
    </div> 
 
    <div class="row text-center content-wrapper"> 
 
    <div class="col-lg-12 content-header"> 
 
     <h1 class="title">We Are Awesome Creative Agency</h1> 
 
     <p class="description-header"> 
 
     This is Photoshop's version of Lorem Ipsum. Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem<br> quis bibendum auctor, nisi elit consequat ipsum, nec sagittis sem nibh id elit. Duis sed odio sit amet nibh<br> vulputate cursus 
 
     a sit amet mauris. Morbi accumsan ipsum velit. 
 
     </p> 
 
     <div class="button"> 
 
     <a class="content-button">LEARN MORE</a> 
 
     </div> 
 
    </div> 
 
    </div> 
 
    </div> 
 
</header>

0
votes
answers
8 views
+10

CSS在焦點上添加僞元素

1

我想顯示焦點上的關閉圖標。它已經在React Bootstrap上懸停顯示,但我希望它在焦點上顯示,並且不顯示圓圈。當我懸停在li tag上時,它顯示關閉圖標(這是使用反應引導程序)。現在我想讓相同的圖標顯示在a tag的焦點上。 Here's the working fiddle.CSS在焦點上添加僞元素

我的HTML:

<div class="test"> 
    <nav class="nav"> 
    <ul class="navtabs"> 
     <li> 
     <a href="showMe/1"> 
      <div class= "inside"> 
      <div class="delete"> 
       <i class="fa-times-circle"> </i> 
      </div> 
      </div> 
     </a> 
     </li> 
    </ul> 
    </nav> 
</div> 

我的CSS:

.nav > ul.navtabs > li > a:focus > .fa-times-circle::before { 
    content: "F057"; 
} 
+0

也許只是複製/粘貼問題,但在此代碼中缺少兩個正確的插入符號。一個放在你的'a'標籤上,另一個放在你的'i'標籤上。 –

+0

您似乎拼錯了標記中的圖標類名稱。如果你將'''改成''(注意丟失的** s **),一切都應該起作用。 – agrm

沙发
0
2

> selector您使用的手段,如果它是a:focus直接子.fa-times-circle::before纔會被選中。但它不是 - 你的HTML中有兩個div。

刪除>選擇器,使您的整體選擇器看起來像.nav > ul.navtabs > li > a:focus .fa-times-circle::before,它應該工作。

此外請務必關閉您的<a>標籤。您在href之後缺少>支架。

+0

已刪除>但它仍然不顯示僞元素 – ksernow

+0

感謝作品。 https://jsfiddle.net/9bo81jyy/ – ksernow

0
votes
answers
7 views
+10

bootstrap 3切換按鈕不工作

0

是的,我知道這個問題已經問了Stackoverflow數百萬次,我看着他們,但仍然無法找到什麼是錯的。任何幫助將不勝感激,謝謝。bootstrap 3切換按鈕不工作

<!DOCTYPE html> 
<html> 
<head> 
<meta charset="utf-8"> 
<meta name="viewport" content="width=device-width"> 
<title>front page</title> 
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" /> 
<link href="main.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="js/bootstrap.js"></script> 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script> 
</head> 
<body> 
<nav class="navbar navbar-default"> 
    <div class="container-fluid"> 
    <div class="navbar-header"> 
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#mainNavbar"> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
     <span class="icon-bar"></span> 
    </button> 
    </div> 
    <div class="collapse navbar-collapse" id="mainNavbar">  <!--Main menu starts--> 
    <ul class="nav navbar-nav"> 
     <li class="active"><a href="#">Home</a></li> 
     <li><a href="#">About</a></li> 
     <li><a href="#">Services</a></li> 
     <li><a href="#">Career</a></li> 
     <li><a href="#">Contact</a></li> 
    </ul> 
    </div> 
    </div> 
</nav> 
</body> 
</html> 
+0

你對控制檯的任何錯誤? ''標籤,而不是頭之前嘗試加載腳本。 – azs06

+0

是的,我在控制檯中的錯誤,腳本error.So我應該永遠只是身體標記結束前使用腳本標記? –

+0

是的,這是很好的做法body標籤結束之前加載腳本。 – azs06

沙发
0
0

jQuery的文件,應先以實現這一目標被加載。

因此,它應該是這樣的。

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.js"></script> 

<script type="text/javascript" src="js/bootstrap.js"></script> 
+0

太感謝你了,它的工作就像魅力。 –

0
votes
answers
7 views
+10

在Laravel控制器中解析引導日期範圍選取器值?

0

我有一個引導日期範圍選擇器中輸入這給像這樣類似的東西值:在Laravel控制器中解析引導日期範圍選取器值?

"dateRange" => "19 Nov 2017 - 18 Dec 2017" 

我需要在我的控制器來解析這個值,並得到兩個日期出來。開始日期和結束日期。 (最好使用Carbon

我該如何去做這件事?

+1

字符串操作,然後日期操作後 – madalinivascu

沙发
0
1

您可以簡單地使用explode()這個(DEMO):

$dates = explode(' - ', '19 Nov 2017 - 18 Dec 2017'); 
var_dump($dates); 
板凳
0
1

通過@ mega6382擴展的回答,您可以解析日期爆炸他們

$dates = explode(' - ', '19 Nov 2017 - 18 Dec 2017'); 
$start_date = Carbon::parse($dates[0]); 
$end_date = Carbon::parse($dates[1]); 
地板
0
1
<?php 

$date = explode('-',"19 Nov 2017 - 18 Dec 2017");// dateRange is you string 
$dateFrom = $date[0]; 
$dateTo = $date[1]; 
$DateNew= strtotime($dateFrom); 
echo $dateFrom = date('Y-m-d', $DateNew); 
$DateNew= strtotime($dateTo); 
echo $dateTo = date('Y-m-d', $DateNew); 
0
votes
answers
7 views
+10

使用Tweepy API搜索列表中的

1

我想用Tweepy的搜索API來返回功能條款的任何列表中的鳴叫搜索任何元素,不僅鳴叫包含所有條款。使用Tweepy API搜索列表中的

twts = api.search(q=["Hello World!", "I love Python!"]) 

這將返回包含「Hello World!」的tweets。和「我愛Python!」,但我想要包含其中的推文。

沙发
0
1

其中standard Twitter search operators的是OR,您可以使用:

api.search(q='"Hello World!" OR "I love Python!"') 

注意的是雙引號將執行「確切的短語」搜索。

0
votes
answers
7 views
+10

想不通什麼是錯的代碼

-2

我試圖做到這一點的設計...想不通什麼是錯的代碼

enter image description here 但結果不出我所料,我不是真的清楚如何與柔性嘗試此屬性和bootstrap,但它們不是我的強項。請解釋,解決方案背後的步驟或鏈接/視頻到可以的網站。

.Charlie{ 
 
border: solid 1px #333; 
 
text-align:center; 
 
display: flex; 
 
height: 786px; 
 
width: 550px; 
 
margin-left: 100px; 
 
margin-right: 100px; 
 
margin-top: 30px; 
 
} 
 

 
#leftColumn { 
 
    border-right: solid 1px #333; 
 
    padding:0 
 
} 
 

 
#rightColumn { 
 
    border-left: solid 1px #333; 
 
    padding:0; 
 
    margin-top: 250px; 
 

 
} 
 

 

 
#leftColumn div, 
 
#rightColumn div{ 
 
    border-bottom: solid 1px #333; 
 
    line-height:3em 
 
} 
 

 
#leftColumn div:last-of-type, 
 
#rightColumn div:last-of-type { 
 
border-bottom-width: 0 
 
} 
 

 
#middleColumn { 
 
line-height: 9em; 
 
width: 550px; 
 
}
<div class="Charlie clearfix"> 
 
     <div class="col-xs-4" id="leftColumn"> 
 
     <div>C</div> 
 
     <div>H</div> 
 
     <div>A</div> 
 
	 <div>R</div> 
 
	 <div>L</div> 
 
	 <div>I</div> 
 
	 <div>E</div> 
 
    </div> 
 
    <div class="col-xs-4" id="middleColumn"> 
 
     <img class="amber" id="charlie" src="https://s-media-cache-ak0.pinimg.com/originals/6f/90/17/6f901708bf30f8a04bc04ce143fadade.jpg" height="786" width="550" > 
 
     <a href="#" id="view3"> Veiw Collection</a> 
 
	 </div> 
 
    <div class="col-xs-4" id="rightColumn"> 
 
     <div>A</div> 
 
     <div>M</div> 
 
     <div>B</div> 
 
	 <div>E</div> 
 
	 <div>R</div> 
 
     </div> 
 
    </div>

+0

Stack Overflow是詢問關於特定編程問題的一個具體問題的平臺。這不是要求教程的地方。 https://stackoverflow.com/help/on-topic – Rob

+0

我不是要求教程,但我想了解我做錯了什麼,以備將來參考。 –

+1

您要求某人展示如何執行此操作的步驟,鏈接和視頻。所有這些違反了至少兩個堆棧溢出規則和策略。 – Rob

沙发
0
0

以下是我會做:

.flex-container { 
 
    display: flex; 
 
    border: 1px solid; 
 
    border-width: 1px 1px 0 0; 
 
} 
 
.flex-container > * { 
 
    display: flex; 
 
    flex-direction: column; 
 
    flex: 1; 
 
    height: calc(100vh - 1px); 
 
} 
 
.flex-container > * > * { 
 
    border: 1px solid; 
 
    display: flex; 
 
    align-items: center; 
 
    justify-content: center; 
 
    flex: 1; 
 
    margin: -1px -1px 0 0; 
 
    box-sizing: border-box; 
 
} 
 

 
body {margin: 0;} 
 
.backgroundColumn { 
 
    background: url(https://source.unsplash.com/random/400x800) no-repeat 50% 50% /cover; 
 
} 
 

 
/* rest is just styling. ignore. */ 
 

 
.flex-container { 
 
    background-color: #424242; 
 
    color: white; 
 
} 
 
.flex-container, .flex-container * { 
 
    border-color: rgba(255,255,255,.07); 
 
}
<div class="flex-container"> 
 
    <div> 
 
    <div> text</div> 
 
    <div> text</div> 
 
    <div> text</div> 
 
    </div> 
 
    <div> 
 
    <div class="backgroundColumn"></div> 
 
    </div> 
 
    <div> 
 
    <div> text</div> 
 
    <div> text</div> 
 
    <div> text</div> 
 
    </div> 
 
</div>

的關鍵因素是爲.flex-container > *指定height值(如果你不」 t,孩子們將根據他們的內容堆疊起來,他們沒有長到填滿父母的高度)。

作爲概念驗證。

板凳
0
0

利用Bootstrap(Bootstrap包含在頭部,以防萬一你忘記了它)。

Bootstrap起初似乎讓人望而生畏,但起步非常簡單。很多是重複性代碼,需要一些時間來記憶。至於資源去的,我建議:https://www.tutorialrepublic.com/twitter-bootstrap-tutorial/

img { 
 
    width: 100%; 
 
    height: 100%; 
 
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" rel="stylesheet"/> 
 
<div class="container"> 
 
    <div class="row row-eq-height"> 
 
     <div class="col-sm-3"> 
 
      <div class="row"> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
       </div> 
 
     </div> 
 
     <div class="col-sm-6"><img src="http://via.placeholder.com/350x150" /></div> 
 
     <div class="col-sm-3"> 
 
       <div class="row"> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
        <div class="col-sm-12"><img src="http://via.placeholder.com/350x150" /></div> 
 
       </div> 
 
     </div> 
 
    </div> 
 
</div>

的jsfiddle:https://jsfiddle.net/Jabideau/L1tqtqr7/

0
votes
answers
7 views
+10

html bootstrap無法對齊到中心

1

嘿傢伙我是新來的Stackoverflow,我一直在HTML編碼超過5個月了。我目前正在與Boostrap合作。我目前正在嘗試修改this網站,我喜歡它。但我似乎無法正確對齊,如this image所示。正如你所看到的,左側有更多的空間,右側有更少的空間。html bootstrap無法對齊到中心

我看過其他類似問題的Stackoverflow帖子,我查看了CSS文件,並試圖找到任何與保證金有關的內容並對其進行了修改,但我無法使其工作,因此我的部分正確居中。我正在使用row和span12。

基本上我試圖對準部分(<section id="projects">)頁面

我希望有人能幫助我的中心。 P.S這裏是一個下載鏈接的網站

http://www.alessioatzeni.com/blog/brushed-template/

太謝謝你了:)

更新1 這是我的工作股利。我沒有修改CSS

<!-- Our Work Section --> 
<div id="work" class="page"> 
    <div class="container"> 
     <div class="row"> 
      <div class="span12"> 
       <div class="title-page-less-margin"> 
        <h2 class="title">Our Work</h2> 
        <h3 class="title-description">Check Out Our Projects on <a href="#">Dribbble</a>.</h3> 

       </div> 
      </div> 
     </div> 
     <!-- Portfolio Projects --> 

     <div class="span12"> 
      <div class="row"> 

       <div class="title-page-less-margin"> 
        <nav id="options" class="work-nav"> 

         <ul id="filters" class="option-set" data-option-key="filter"> 
          <a href="#filter" data-option-value="*" class="selected">All Projects</a> 
          <a href="#filter" data-option-value=".design">Design</a> 
          <a href="#filter" data-option-value=".photography">Photography</a>< 
          <a href="#filter" data-option-value=".video">Video</a> 
         </ul> 

        </nav> 
       </div> 


       <section id="projects"> 
        <ul id="thumbs"> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 design"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The City" href="_include/img/work/full/image-01-full.jpg"> 

           <span class="overlay-img"></span> 
           <span class="overlay-img-thumb font-icon-plus"></span> 
          </a> 

          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-01.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis. hihihi"> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 design"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Office" href="_include/img/work/full/image-02-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-02.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 photography"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Mountains" href="_include/img/work/full/image-03-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-03.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 video"> 
          <!-- Fancybox Media - Gallery Enabled - Title - Link to Video --> 
          <a class="hover-wrap fancybox-media" data-fancybox-group="video" title="Video Content From Vimeo" href="http://vimeo.com/51460511"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-08.jpg" alt="Video"> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 photography"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Sea" href="_include/img/work/full/image-04-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-04.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 photography"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="Clouds" href="_include/img/work/full/image-05-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-05.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 video"> 
          <!-- Fancybox Media - Gallery Enabled - Title - Link to Video --> 
          <a class="hover-wrap fancybox-media" data-fancybox-group="video" title="Video Content From Vimeo" href="http://vimeo.com/50834315"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-09.jpg" alt="Video"> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 design"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Dark" href="_include/img/work/full/image-06-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-06.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 

         <!-- Item Project and Filter Name --> 
         <li class="item-thumbs span3 design"> 
          <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
          <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Beach" href="_include/img/work/full/image-07-full.jpg"></a> 
          <!-- Thumb Image and Description --> 
          <img src="_include/img/work/thumbs/image-07.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
         </li> 
         <!-- End Item Project --> 
        </ul> 
       </section> 
      </div> 
     </div> 

     <!-- End Portfolio Projects --> 


     <!-- End Title Page --> 
    </div> 
</div> 
+0

什麼是你想準確對齊? – Srax

+0

@Srax對不起,我應該提到這一點。我正在嘗試對齊圖像,使得'section'帶有id'projects' – noobthatsnew

+0

您能否提供HTML和CSS,會讓它更容易幫助您。 – Srax

沙发
0
0

更換整個<div class="container">與下面的代碼:
PS:我知道你不應該寫在HTML CSS,但是這是他們的方式我固定它,而不必在CSS我pc,你可以稍後將它移動到樣式表中。

<div class="container"> 
    <!-- Title Page --> 
    <div class="row" style=" 
     text-align: center; 
     padding-bottom: 30px; 
     "> 
     <h2 class="title">Our Work</h2> 
     <h3 class="title-description">Check Out Our Projects on <a href="#">Dribbble</a>.</h3> 
     <div class="title-page-less-margin"> 
      <nav id="options" class="work-nav"> 

       <ul id="filters" class="option-set" data-option-key="filter"> 
        <a href="#filter" data-option-value="*" class="selected">All Projects</a> 
        <a href="#filter" data-option-value=".design">Design</a> 
        <a href="#filter" data-option-value=".photography">Photography</a>&lt; 
        <a href="#filter" data-option-value=".video">Video</a> 
       </ul> 

      </nav> 
     </div> 
    </div> 

    <div class="row"> 

     <section id="projects"> 
      <ul id="thumbs"> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 design"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The City" href="_include/img/work/full/image-01-full.jpg"> 

           <span class="overlay-img"></span> 
           <span class="overlay-img-thumb font-icon-plus"></span> 
          </a> 

        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-01.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis. hihihi"> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 design"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Office" href="_include/img/work/full/image-02-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-02.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 photography"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Mountains" href="_include/img/work/full/image-03-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-03.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 video"> 
        <!-- Fancybox Media - Gallery Enabled - Title - Link to Video --> 
        <a class="hover-wrap fancybox-media" data-fancybox-group="video" title="Video Content From Vimeo" href="http://vimeo.com/51460511"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-08.jpg" alt="Video"> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 photography"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Sea" href="_include/img/work/full/image-04-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-04.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 photography"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="Clouds" href="_include/img/work/full/image-05-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-05.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 video"> 
        <!-- Fancybox Media - Gallery Enabled - Title - Link to Video --> 
        <a class="hover-wrap fancybox-media" data-fancybox-group="video" title="Video Content From Vimeo" href="http://vimeo.com/50834315"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-09.jpg" alt="Video"> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 design"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Dark" href="_include/img/work/full/image-06-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-06.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 

       <!-- Item Project and Filter Name --> 
       <li class="item-thumbs span3 design"> 
        <!-- Fancybox - Gallery Enabled - Title - Full Image --> 
        <a class="hover-wrap fancybox" data-fancybox-group="gallery" title="The Beach" href="_include/img/work/full/image-07-full.jpg"></a> 
        <!-- Thumb Image and Description --> 
        <img src="_include/img/work/thumbs/image-07.jpg" alt="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis elementum odio. Curabitur pellentesque, dolor vel pharetra mollis."> 
       </li> 
       <!-- End Item Project --> 
      </ul> 
     </section> 

    </div> 
</div> 

應該是這樣的: enter image description here

+0

哇,它沒有辦法工作!非常感謝。因此,對於使用行或跨度的所有內容,我將如何修復它?因爲除了項目之外沒有任何東西可以對齊 – noobthatsnew

+0

沒問題,很高興我能提供幫助。 不幸的是編輯一個模板可能是一個真正的痛苦。 你可以嘗試給我你整個項目。你可以上傳到某個地方的zip文件,併發送給我一個下載鏈接:) – Srax

+0

在這裏你去https://drive.google.com/open?id=1aGTPj3ojSZeJNFkwHCx_K-_9Avf3rxAj認真老兄我很高興你可以幫助你不知道多久我試圖修復它之前,我發佈的問題 – noobthatsnew

0
votes
answers
7 views
+10

顯示此引導模態頁面加載

-2

我有以下引導模式...顯示此引導模態頁面加載

HTML:

<div id="tallModal" class="modal modal-wide fade"> 
    <div class="modal-dialog"> 
    <div class="modal-content"> 
     <div class="modal-header"> 
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> 
     <h4 class="modal-title">Modal title</h4> 
     </div> 
     <div class="modal-body"> 
     <p>One fine body&hellip;</p> 
     </div> 
     <div class="modal-footer"> 
     <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> 
     <button type="button" class="btn btn-primary">Save changes</button> 
     </div> 
    </div><!-- /.modal-content --> 
    </div><!-- /.modal-dialog --> 
</div><!-- /.modal --> 

CSS:

.modal.modal-wide .modal-dialog { 
    width: 90%; 
} 
.modal-wide .modal-body { 
    overflow-y: auto; 
} 

JS:

$(".modal-wide").on("show.bs.modal", function() { 
    var height = $(window).height() - 200; 
    $(this).find(".modal-body").css("max-height", height); 
}); 

這是在CodePen上:https://codepen.io/TomAshley/pen/wPxBjB

如何在頁面加載後立即顯示模式?我的這種嘗試是使用window.load,你可以在這裏看到:

$(window).load("show.bs.modal", function() { 
     var height = $(window).height() - 200; 
     $(this).find(".modal-body").css("max-height", height); 
    }); 

不過,這並不彈出模式。如何使它在頁面加載時彈出?

+0

我不認爲我應該使用id我的例子。這就是我問的原因。 – xendi

+0

它也可以和一個類一起工作,只是可能得到一個重複的 –

沙发
0
3

觸發模態編程

$(document).ready(function() { 
    $('#tallModal').modal('show'); 
}); 

這裏是pen

+0

或者它可以是'$('。modal-wide')。modal('show');',對吧?謝謝 – xendi

+0

是的,你只改變了選擇器,但它匹配相同的元素,id(#)更安全 – ztadic91

+0

由於某些原因,在我的設計中,當我添加這個時,模式寬度要小得多。任何想法我怎麼能阻止呢? – xendi

板凳
0
0

對於這種情況,我們可以使用

$(document).ready(function() { 
    var height = $(window).height() - 200; 
    $(this).find(".modal-body").css("max-height", height); 
} 
+0

這不回答這個問題... –