Bootstrap内部对图片样式的默认设置
img { border: 0;/*This removes any border when images are rendered.*/ page-break-inside: avoid;/*avoids page breaks inside images.*/ max-width: 100% !important;/*make sure that even if the width of the image exceeds the container, it is restricted to the premise of the container.*/ vertical-align: middle;/*an image is vertically centred within a div or other element*/ }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Default buttons from Bootstrap 3</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <link href="../../bootstrap-3.0.0/dist/css/bootstrap.min.css" rel="stylesheet" media="screen"> <style> body { padding: 50px/*边距*/ } .mdl { background-color: silver;/*背景*/ padding: 7px/*上下左右边距*/ } </style> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body> <!-- 图片样式 --> <p class="mdl"> <img src="../../bootstrap-3.0.0/image/icon-default-screenshot.png">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </p> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="../../bootstrap-3.0.0/assets/js/jquery.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="../../bootstrap-3.0.0/dist/js/bootstrap.min.js"></script> </body> </html>
为图片指定样式
img-rounded 圆角图片
<!-- 图片样式 --> <p class="mdl"> <!-- 圆角,响应式(自动根据屏幕尺寸调整到合适的大小) --> <img src="../../image/mobile.jpg" class="img-rounded img-responsive"> </p>
img-thumbnail 缩略图样式,但不是真正的缩略图
图片四周有边框效果
<!-- 缩略图样式 --> <img src="../../image/mobile.jpg" class="img-rounded img-thumbnail">
img-circle 圆形图片
<!-- 圆形图片 --> <img src="../../image/mobile.jpg" class="img-rounded img-circle img-responsive">
Responsive image 响应式图片
Bootstrap没有把responsive样式设置为默认的,需要手动设置
.img-responsive { display: block; height: auto; max-width: 100%; }
设置响应式图片最简单的办法:在img标签上设置class="img-responsive"
<!-- 让图片具有响应功能 --> <img src="../../image/mobile.jpg" class=" img-responsive">
相关推荐
bootstrap-image-hover是一款基于Bootstrap的css3图片hover效果。这组图片hover效果共16种特效。同时该特效也支持非Bootstrap版本。
Bootstrap 3图片库 项目:Bootstrap3&HTML和CSS 这是一个图像库,它由Udemy上的Colt Steele使用了针对Web开发人员训练营的bootstrap 3练习。 实时预览 结果 引导程序3 学习了如何阅读和使用Bootstrap 3
图像上传功能与Bootstrap所见即所得编辑器集成 转到js/jquery.pagedown-bootstrap.combined.js ,第2370 。 更改您要上传图像的URL。 type : 'POST' , url : "upload.php" , // change URL here dataType : 'json'...
bootstrap 图片预览
功能性通过降低分辨率和尺寸压缩图像离线压缩建于ReactJS React Bootstrap 浏览器图像压缩发展克隆存储库并更改目录。 git clone ...
最近因为项目需要用到了bootstrap fileinput的插件,在使用苹果手机上传图片预览时,发现图片方向和手机本地存储方向不一致问题。后来通过查询资料了解图片具有EXIF(Exchangeable Image File Format)旋转属性标识,...
我改进了一下 实现了真正的放大效果,只需要一张图图片即可,可以放大任意倍数。 xzoom: 288, //放大后div的宽 yzoom: 300, //放大后div的高 offset: 10,//间距 position: "right",//位置 zoomWidth:400,//放大后...
"# image-slider-2 (Bootstrap)
Filterable-Image-Gallery- 可过滤的图片库功能允许您将照片分组。 将照片按类别分组后,您可以将它们用作前端的可点击过滤器。 使用的技术 - HTML、CSS、BOOTSTRAP、JAVASCRIPT、DOM 操作。
图片上传器描述基于Blueimp的Laravel 4 Easy Image Uploader( )安装 TODO用法首先包含 JQuery 和 Bootstrap CSS 文件。 Uploader::script('basic')基本:'基本' 基本加:'bplus' 在您想要的位置渲染上传按钮 ...
生成博客的封面图片 创建私人相册并让iframe添加到您的网站中 项目概况 申请链接 前端代码-> 部署的URL-> 后端代码-> API文档-> 科技栈 前端:Reactjs 其他NPM库 React烤 React路由器域 react-router-bootstrap ...
图片上传ASP.NET MVC ImageUpload 概念使用 ASP.Net、MVC 5、Entity Framework 6 的带有 CRUD(创建、读取、更新、删除)示例的基本图像上传应用程序。 ###基本概念合并HTML 版本基本 CRUD Bootstrap 样式jQuery ...
图片hover下改变图片的样式
快速开始$ git clone git@github.com:mjhea0/node-bootstrap3-template.git your_app $ cd your_app $ npm install $ node app桌面版移动版 1移动版 2
图片编辑训练营 项目设置 Clone project npm install npm install vue npm run serve - open app on localhost 项目详情 This web application was made with vue js and i also used some library's which are - --...
}{stat}var stat = { name : '/path/to/image-0.jpg' date : 1439473396695 , size : 12345 , [ directory : true ]} 假设只有3种类型的文件: jpeg图片(.jpg) 纯文本(.txt) 目录(空扩展名) ##创建服务,对...
背景图片 使用html,css和bootstrap的背景图像
使用Django,Bootstrap,Python,A-Frame和PostgreSQL部署360图片库
图片识别 3. 识别数据持久化 (MySQL5.7) 本项目是一个基于前后端的身份证识别项目。 后端使用 Python 的 Flask 框架,提供相关数据接口 前端使用 H5+CSS3+JavaScript 及其 Jquery,BootStrap 框架来构建页面和利用...
图像插件使用PHP CodeIgniter Framwork和Bootstrap的图像库主要特点是: 旋转调整大小庄稼瓦塔尔马克图片清单删除这个插件很容易集成到任何codeIgniter项目中。 只需将文件复制粘贴到相应的文件夹中即可。 在项目根...