viewport

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

安稳与你 提交于 2019-12-03 04:15:13
问题 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? 回答1: Add this in your preamble \usepackage{hyperref} \usepackage[all]{hypcap} %for going to the

Issue with iOS 11 full screen web app on iPad and the status bar

那年仲夏 提交于 2019-12-03 03:58:19
I have a full screen home screen web app that is designed for 1024x768 resolution so it fits perfectly on the iPad in landscape mode. Or at least, it did, until the iOS 11. This update now has content rendered under the status bar which pushed the entire page down 20 pixels. My meta-tags involved are as follows: <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <meta name="viewport" content="initial-scale=1,user-scalable=no,viewport-fit=cover"> I was under the impression that the "viewport-fit=cover" would

Get viewport height when soft keyboard is on

和自甴很熟 提交于 2019-12-03 03:41:09
问题 I've been trying to make this work for days now, with no luck, so I thought I'd share info and maybe someone comes up with a solution. I want to get the exact viewport size when the soft keyboard is up. I am currently using the following code on the header in order for the site to be responsive: <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> What I realized is that when the soft keyboard comes up, it uses the device height as the

Android ignores maximum-scale when using fixed-width viewport meta-tag

心不动则不痛 提交于 2019-12-03 03:21:07
I have a fixed-width web page (640 pixels wide). I would like this page to shrink to the width of a mobile device. However, if the device's native width is larger than 640 pixels, I do not want it stretched. Seems simple enough: <meta name="viewport" content="width=640, maximum-scale=1.0" /> This works as expected in iPad/iPhone. However, on an Android tablet (ex. in landscape mode), the content gets scaled up to fit the display. In other words, Android is simply ignoring maximum-scale=1 . You can see an example page with the problem here . For the sake of completeness here is the source: <

Viewport vs Window Vs Document

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In the below code, document.documentElement.clientWidth 1349 document.documentElement.clientHeight 363 window.innerWidth 1366 window.innerHeight 363 window.screen.height 768 window.screen.width 1366 So, My desktop screen is 1366 px wide and 768 px height. I learnt that, viewport dimensions are referred using document.documentElement.clientWidth and document.documentElement.clientHeight . window dimensions are referred using window.innerWidth and window.innerHeight . 1) What is the difference between viewport and document? 2) when does window

CSS Calc Viewport Units Workaround?

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: From what I've seen in other answers , CSS viewport units can't be used in calc() statements yet. What I would like to achieve is the following statement: height : calc ( 100vh - 75vw ) Is there some workaround way I can achieve this using purely CSS even though the viewport units can't be used in the calc() statement? Or just CSS and HTML? I know I can do it dynamically using javascript, but I'd prefer CSS. 回答1: Before I answer this, I'd like to point out that Chrome and IE 10+ actually supports calc with viewport units. FIDDLE

03JavaScript程序设计修炼之道_ JS进阶 OOP、构造函数 2019-07/21-171247***0725-200514

匆匆过客 提交于 2019-12-03 02:42:19
note.txt js进阶部分 1 变量及其作用域 全局变量 局部变量 作用域 作用域链 let/var 区别 const 定义常量 2 异步专题 回调函数 同步异步 es6 Promise(使用和手写实现) 3 oop 原型 原型链 面向对象 。。。 es6 class 等 4 闭包 5 面试题 ... note.md 1 变量与常量 var a = 10; var一些问题 * var重复定义 会覆盖 * 没有块级作用域 * 变量会自动提升 es6 let/const * 重复定义会报错 * 具有块级作用域 * 不存在预解析 建议多使用let const定义常量 希望某个值不希望被修改 不能重新赋值 2 javascript是什么 解释执行 预解析 1 全局预解析(所有变量和函数声明都会提升 同名函数与变量函数的优先级高) 2 函数内部预解析 执行 头等函数(First-class Function) 动态 执行环境 浏览器宿主 node 编程范式 基于原型 多范式 3 oop 对象 狭义对象 {} 广义对象 dom元素、Array、Math...... json { "name":"along", "sex":"M" } 1let&const.htm 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset=

QGraphicsView Zooming in and out under mouse position using mouse wheel

匿名 (未验证) 提交于 2019-12-03 02:41:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an application with a QGraphicsView window in the middle of the screen. I want to be able to zoom in and out using a mouse wheel scroll. Currently I have re-implemented QGraphicsView and overriden the mouse scroll function so that it doesn't scroll the image (like it does by default). void MyQGraphicsView::wheelEvent(QWheelEvent *event) { if(event->delta() > 0) { emit mouseWheelZoom(true); } else { emit mouseWheelZoom(false); } } so when I scroll, I'm emitting a signal true if mouse wheel forward false if mouse wheel back. I have then

适配方案(一)之移动端适配

你说的曾经没有我的故事 提交于 2019-12-03 02:30:07
老版常规做法 方案一:Meida Queries媒体查询 meida queries 主要是通过查询设备的宽度来执行不同的 css 代码,最终达到界面的配置。核心语法是: @media screen and (max-width: 600px) { /*当屏幕尺寸小于600px时,应用下面的CSS样式*/ /*你的css代码*/ } 需要添加meta设置 <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> width=device-width :表示宽度是设备屏幕的宽度 initial-scale=1.0:表示初始的缩放比例 minimum-scale=1.0:表示最小的缩放比例 maximum-scale=1.0:表示最大的缩放比例 user-scalable=no:表示用户是否可以调整缩放比例 这个标签可以保证在移动端设备中,页面的宽度与屏幕宽度相同。 方案二:viewport缩放 以最小的Iphone4/5的宽度(320px)为基准,还原视觉稿。 < meta name= "viewport" content= "width=device-width, user

Bootstrap.js throws a selector option error: selector option must be specified when initializing tooltip on the windows.document object

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When I try run my web application in bootstrap.js I get the following error: Unhandled exception at line 1306, column 7 in localhost:7904/Scripts/bootstrap.js 0x800a139e - JavaScript runtime error: selector option must be specified when initializing tooltip on the window.document object! This is the following lines of code it is referring to: Tooltip.prototype.init = function (type, element, options) { this.enabled = true this.type = type this.$element = $(element) this.options = this.getOptions(options) this.$viewport = this.options