viewport

How to make a hyperlink navigate to the top of the figure in LaTeX when using hyperref?

孤者浪人 提交于 2019-12-02 16:41:30
I have a LaTeX document with a figure and references to it: \begin{figure} ... \caption{...} \label{fig:1} \end{figure} \ref{fig:1} I use the hyperref package to get hyperlinks in the resulting PDF. However the link to the figure navigates to the caption leaving the figure itself out of the view. How can I make it navigate to the start of the figure instead without moving the caption to the top? Add this in your preamble \usepackage{hyperref} \usepackage[all]{hypcap} %for going to the top of an image when a figure reference is clicked Make sure that the \usepackage[all]{hypcap} is written

移动端页面的一些心得

本小妞迷上赌 提交于 2019-12-02 12:22:39
允许网页宽度自动调整 在 head 标签里加入 viewport 元标签, viewport 是网页默认宽度和高度 //网页宽=屏幕宽,原始缩放比0.5   <meta name="viewport" content="width=device-width, initial-scale=0.5" /> 不要固定宽度,字体也是    使用 width : xx % ;或 width : auto ; 在写CSS的时候,需要注意: -1. body选择器中声明Font-size=62.5%; -2. 将你的原来的px数值除以10,然后换上em作为单位; -3. 重新计算那些被放大的字体的em数值。避免字体大小的重复声明。 也就是避免1.2 * 1.2= 1.44的现象。比如说你在#content中声明了字体大小为1.2em,那么在声明p的字体大小时就只能是1em,而不是1.2em, 因为此em非彼em,它因继承#content的字体高而变为了1em=12px。 em是相对长度单位。相对于当前对象内文本的字体尺寸。如当前对行内文本的字体尺寸未被人为设置,则相对于浏览器的默认字体尺寸。(引自CSS2.0手册) 任意浏览器的默认字体高都是16px。所有未经调整的浏览器都符合: 1em=16px。那么12px=0.75em,10px=0.625em。为了简化font-size的换算

viewport (视口)

谁都会走 提交于 2019-12-02 11:55:57
视口(viewport) nbsp;nbsp;nbsp;nbsp;视口(viewport)是用来约束网站中最顶级块元素的, 即决定了的大小 PC设备 nbsp;nbsp;nbsp;nbsp;在pc设备上viewport的大小取决于浏览器窗口的大小, 以css像素作为度量单位(pc端 视口(virewport大小与浏览器大小一致)). nbsp;nbsp;nbsp;nbsp;通过以往css的知识, 我们都能理解的大小是会影响到我的网页布局的, 而viewport又决定了的大小, 所以viewport间接的并决定了我的网页布局. 移动设备 nbsp;nbsp;nbsp;nbsp;移动设备的屏幕普遍是比较小的, 但是大部分的网站又都是为PC设备来设计的, 要想让移动设备也可以正常显示网页, 移动设备不得不做一些处理; nbsp;nbsp;nbsp;nbsp;在移动设备上viewport不再受限于浏览器窗口, 而是允许开发人员自由设置viewport的大小, 通常浏览器会设置一个默认大小的viewport, 为了能够正常显示那些转为pc设计的网页, 一般这个值的大小会大于屏幕的尺寸. viewport nbsp;nbsp;nbsp;nbsp;移动设备上有2个viewport(为了方便讲解人为定义的), 分别是layout viewport 和ideal viewport nbsp;nbsp

-webkit-内核兼容处理

狂风中的少年 提交于 2019-12-02 11:52:05
如果你是一名前端er,又想在移动设备上开发出自己的应用,那怎么实现呢?幸好,webkit内核的浏览器能帮助我们完成这一切。接触 webkit webApp的开发已经有一段时间了,现把一些技巧分享给大家 : 1. viewport: 也就是可视区域。对于桌面浏览器,我们都很清楚viewport是什么,就是出去了所有工具栏、状态栏、滚动条等等之后用于看网页的区域, 这是真正有效的区域。由于移动设备屏幕宽度不同于传统web,因此我们需要改变viewport; 实际上我们可以操作的属性有4 个: width - // viewport 的宽度 (范围从200 到10,000,默认为980 像素) height - // viewport 的高度 (范围从223 到10,000) initial-scale - // 初始的缩放比例 (范围从>0 到10) minimum-scale - // 允许用户缩放到的最小比例 maximum-scale - // 允许用户缩放到的最大比例 user-scalable - // 用户是否可以手动缩 (no,yes) 那么到底这些设置如何让Safari 知道?其实很简单,就一个meta,形如: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> //编码 <meta

响应式布局笔记

僤鯓⒐⒋嵵緔 提交于 2019-12-02 11:03:18
一. 布局设计 固定布局:以像素作为页面的基本单位,不管设备屏幕及浏览器宽度,只设计一套尺寸; 可切换的固定布局:同样以像素作为页面单位,参考主流设备尺寸,设计几套不同宽度的布局。通过设别的屏幕尺寸或浏览器宽度,选择最合适的那套宽度布局;实现成本最低,但拓展性比较差; 弹性布局:以百分比作为页面的基本单位,可以适应一定范围内所有尺寸的设备屏幕及浏览器宽度,并能完美利用有效空间展现最佳效果; 混合布局:同弹性布局类似,可以适应一定范围内所有尺寸的设备屏幕及浏览器宽度,并能完美利用有效空间展现最佳效果;只是混合像素、和百分比两种单位作为页面单位。 参考 https://www.w3cschool.cn/responsive/8w9adozt.html 总结:对于通栏,大于等于2栏的等分排版建议采用弹性布局;大于等于2栏的非等分排版建议采用混合布局; 二.布局响应 布局响应,对页面进行响应式的设计实现,需要对相同内容进行不同宽度的布局设计,有两种方式:桌面优先(从桌面端开始向下设计);移动优先(从移动端向上设计); 无论基于那种模式的设计,要兼容所有设备,布局响应时不可避免地需要对模块布局做一些变化(发生布局改变的临界点称之为断点), 我们通过JS获取设备的屏幕宽度,来改变网页的布局,这一过程我们可以称之为布局响应屏幕。常见的主要有如下几种方式: 布局不变,对模块内的内容进行1.挤压

SVG for print with scale

旧街凉风 提交于 2019-12-02 10:39:06
I have an SVG file representing a flat in my browser and I need to print the output in a specific scale. I'm using SVG.js to manipulate the SVG content but I can't find a combination of correct viewport viewbox setup to meet my needs. What I know is the SVG source file size. Via the x and y coordinates I calculated a distance to find the correct "screen scale" to match 1cm on the plan with a pixel number. For printing I need to respect "specific scales" for example 1/50. So I tried to get the real flat size by using the "screen scale" and SVG file size. Then I applied the 1/50 (0.02) scale on

Responsive site not showing horizontal lines correctly due to scaling issue

天涯浪子 提交于 2019-12-02 10:22:15
问题 I am adding responsive feature to a website using css, this website has been their for sometime and now responsive feature is being added to it so that it can support mobile version. I am facing one issue suppose a have multiple row which are separated by a horizontal line. in some place i am using hr and in some places i am using simply div to... here is a sample link to fiddle http://fiddle.jshell.net/G2rCT/3/ When i view desktop version then lines exactly show as 1 pixels in height and

Get child element to respect parent element Width & Height

大兔子大兔子 提交于 2019-12-02 10:03:12
I was working on a wepage earlier this week where the 'banner-image' was being cut off the view-port of the screen depending on the browser and size of screen. I thought that by simply converting the Parent Container to 'Height: 100vh' this would make all child elements fit within the parent container that is now set to fit the height of any viewport. This did not work as I intended it to. The banner image was still being cutoff even though the parent container was set to 100vh. Is there a way to do this? JSFiddle Link CSS .parent { width: 100%; background-color: blue; border: 1px dashed blue;

How can I hide a meta tag from the devices with max width:1024px?

不羁的心 提交于 2019-12-02 09:05:33
I tried the below, but it didnt work. Can you help me please? <div class="viewport-setting"><meta name="viewport" content="maximum-scale=0.80"></div> <style>@media (min-width: 0px) and (max-width: 1024px) {.viewport-setting {display:none !important;}}</style> 来源: https://stackoverflow.com/questions/43764920/how-can-i-hide-a-meta-tag-from-the-devices-with-max-width1024px

响应式 Web 设计技巧

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 09:05:07
什么是响应式设计? iOS 和 Android 的发布,智能手机、平板电脑、智能家电等新设备层出不穷,极大便利了我们的生活,但面对形形色色的终端设备,千差万别的屏幕分辨率,给网页设计带来了新的挑战,我们无法估计用户的终端设备和网络状况,更不可能为每种设备都专门设计一套网站,如何实现 Web UI 在多终端中的适配呢?2010 年 Ethan Marcotte 曾经在 A List Apart 发表过一篇文章"Responsive Web Design",响应式网页设计提供了一种设计方法,可以使同一网站在智能手机、桌面电脑,以及介于这两者之间的任意设备上完美显示。这种方法能够根据用户的屏幕尺寸,合理地为现有及将来的各种设备提最佳的浏览体验。 http://mediaqueri.es/ 这是一个响应式设计创意收集网站,可以在上面查看到很多响应式设计实例,较多的网站都应用了 Mobile First 设计思想,先针对小视口设备进行设计,然后逐步对大视口设计进行渐进增强支持。 图 1. Froont 响应式设计网站截屏 这也意味着设计思维的转换,不应再执着于布局、线框等的具体大小,而应该考虑如何使用流体元素。与其根据不同设备的大小来设计页面,更着重考虑如何针对内容进行设计。抛弃像素,抛弃固定宽度,先从小屏幕进行设计,然后逐步增强针对大屏幕的设计 当然也需要引导客户