博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Bootstap] 9. Dropdown
阅读量:4917 次
发布时间:2019-06-11

本文共 7955 字,大约阅读时间需要 26 分钟。

Dropdown Arrow Class 

In order to create a down arrow like this: , what class should we apply to the element? 

Answer: caret

 

Opening Dropdowns 

The Bootstrap Dropdown plugin will toggle a specific class on our element in order to make the dropdown visible. Will the following dropdown menu be visible when the page loads?

  • Yes, it will be visible when the page loads.

  • No, it will not be visible when the page loads.

If you want it open, add a 'open' class to the ul.

 

Take a Tour Today!

We can use the Dropdown Plugin for more than just navigation components. One other place we could use it is on our "Take the Tour" button. Follow the tasks below to convert this button into a Dropdown.

Within our "Take the Tour" button, we'll want to show a little down arrow so our travelers are encouraged to click on it. Add this icon after the text.

      Blasting Off With Bootstrap    

The Fastest Way to Space

Make your way to space in the comfort of your own rocket, elevator or transporter.

Blast off with Bootstrap

Book Today!

Even if you're traveling tomorrow, you can still get tickets today. We have a number of conveniently located ports around the globe to service everyone.

Go Anywhere

If you need to get to space today, why not try out a transporter? Despite the claims, there are have been no deaths in the last 6 weeks!

RocketBus®

For cheapest fares, catch the next RocketBus® to the stars. Cheaper on your wallet, and easiest way to make friends.

Any sufficiently advanced technology is indistinguishable from magic.

Arthur C. Clarke in
Profiles of the Future

Our Transport Systems

Learn more about our transport systems to find out which one is right for you. Pick out the mode of transport that works for your budget and risk level.

Transporter

  • 8 second travel time
  • Chance of death only 1 in 7,593
  • Low price of only $15.99!

Space Elevator

  • 8 hour scenic ride
  • Only 1 horrific death per 12,456
  • Only $45.99 if you book today!

RocketBus

  • 8 minute scenic ride
  • Plunging death rate of under 1/100k
  • $74.99 lets you blast off today!

A dream that became a reality and spread throughout the stars.

Captain Kirk in
Whom Gods Destroy

Plan Your Trip Today!

Todays Time here

Deals here

Forecast

All systems are operational

  • Transporters
  • Space Elevator
  • RocketBus

The National Weather Service has issued a solar flare watch for the following time periods. Please plan accordingly:

  • February 9th, 21:43
  • May 18, 19:82
  • July 4, 08:42

Technically, transporting means making a clone of yourself and killing off the other one. If you believe in a soul, you should be aware of this fact before attempting travel using a transporter.

 

Within our "Take the Tour" button, we'll want to show a little down arrow so our travelers are encouraged to click on it. Add this icon after the text.

 

Our list of links for this Dropdown is currently unstyled. Give it a Bootstrap class to indicate it is a Dropdown Menu.

 

In order to tie in the structure and behavior, we'll need to add a specific attribute to our button to let Bootstrap know this is a Dropdown. Add that attribute and value.

 

Our Dropdown is working! But it seems a little weird we have our 3 transportation methods, and an unrelated link to "Learn More" in there. Go ahead and add a divider before the "Learn More" link.

 

Lastly, we want to indicate that the "Take the Tour" button will popup a dropdown rather than taking us to a new page. We could do this by adding a Glyphicon, but in this case there's an easier way with a class provided by Bootstrap.

Checkout the Bootstrap documentation on  and add the dropdown-toggle class to the appropriate place.

 

转载于:https://www.cnblogs.com/Answer1215/p/4321146.html

你可能感兴趣的文章
gulp-less解决遇到错误停止执行task
查看>>
一些很少用又很常见的功能的实现方法链接
查看>>
20145235《信息安全系统设计基础》第十二周学习总结
查看>>
响应式布局 大中小屏幕
查看>>
iOS开发UI篇—transframe属性(形变)
查看>>
java中的单例模式
查看>>
Elasticsearch Server,2nd Edition pdf 翻译 中文
查看>>
Django-缓存
查看>>
[无关IT]就这样在凌晨写一篇吧~
查看>>
java.util.Map.Entry接口
查看>>
Linux中crond服务与crontab用法
查看>>
PLSQL连接ORACLE配置字符串简介 oracle网络配置 三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora原理解释...
查看>>
分享8年开发经验,浅谈个人发展经历,明确自己发展方向
查看>>
开发使用Node.js的一个小技巧
查看>>
对象序列化
查看>>
UVA 208 Firetruck (DFS+剪枝)
查看>>
windows设置电脑的固定IP
查看>>
Python
查看>>
犀牛Phinoceros 如何切换中文语言
查看>>
Win7如何解决精简版的迅雷7无法运行
查看>>