欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

Bootstrap项目实战之子栏目资讯内容_javascript技巧

程序员文章站 2022-03-25 17:08:13
...
本文我们制作一下子栏目资讯内容,供大家参考,具体内容如下

谷歌浏览器解析的顺序调整,需要全部加载后执行

$(window).load(function() {
  $('.text').eq(0).css('margin-top', ($('.auto').eq(0).height() - $('.text').eq(0).height()) / 2 + 'px');
}); 

注:对于 Firefox 浏览器,可以按 Ctrl+Shift+M,调整移动端尺寸。
子栏目标题

资讯

企业内训的最新动态、资源等...

栏目 CSS

.jumbotron {
  margin: 50px 0 0 0;
  padding: 60px 0;
  background: #ccc url(../img/bg.jpg);
  color: #ccc;
}
.jumbotron h1 {
  font-size: 26px;//768,30; 992,33; 1200,36;
  padding: 0 0 0 20px;
}
.jumbotron h4 {
  font-size: 16px;//768,16; 992,17; 1200,18
  padding: 0 0 0 20px;
}

资讯内容

Bootstrap项目实战之子栏目资讯内容_javascript技巧

广电总局发布 TVOS2.0 华为阿里参与研发

admin 15 / 10 / 11

资讯内容 CSS

#information {
  padding: 40px 0;
  background: #eee;
}
.info-right {
  background-color: #fff;
  box-shadow: 2px 2px 3px #ccc;
}
.info-right blockquote {
  padding: 0;
  margin: 0;
}
.info-right h2 {
  font-size: 20px;
  padding: 5px;
}
.info-right h4 {
  line-height: 1.6;
}
.info-content {
  background-color: #fff;
  box-shadow: 2px 2px 3px #ccc;
  margin: 0 0 20px 0;
}
.info-content img {
  margin: 12px 0;
}
.info-content h4 {
  font-size: 14px;//768,16; 992,18; 1200,20;
  padding: 2px 0 0 0;
}
.info-content p {
  line-height: 1.6;
  color: #666;
}

对于.info-content h4,在中屏和大屏需要保持一行。

.info-content h4 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

更多内容可以参考:Bootstrap学习教程

以上就是Bootstrap制作子栏目资讯内容的想关代码,希望大家喜欢。

Bootstrap项目实战之子栏目资讯内容_javascript技巧

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频