absolute

css3实现钟表效果

我的未来我决定 提交于 2019-11-29 04:42:45
本文转载于: 猿2048 网站 css3实现钟表效果 利用css3 transform属性刻画钟表的的刻度以及指针的角度,代码如下: <head> <meta charset= "UTF-8" > <title>Title </title> <style id= "style" > html{ height: 100% ; } body{ width: 100% ; height: 100% ; margin: 0 ; display: -moz-box ; display: -webkit-box ; display: box ; -webkit-box-align: center ; -moz-box-align: center ; box-align: center ; -webkit-box-pack: center ; -moz-box-pack: center ; box-pack: center ; } . clock{ width: 200 px ; height: 200 px ; border: 4 px solid black ; border-radius: 50% ; position: relative ; } . clock ul{ width: 100% ; height: 100% ; position: relative ; margin: 0

动画平台

时光毁灭记忆、已成空白 提交于 2019-11-29 04:25:38
<!DOCTYPE html> <html> <head> <meta name="format-detection" content="email=no" /> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <meta name="format-detection" content="telephone=no" /> <script src="jquery.js"></script> <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"> <style> * { padding: 0; margin: 0; box-sizing: border-box; } body { padding: 30px; } .a img { width: 100%; height: 100%; } .a { position: absolute; top: 50px; left: 50px; width: 100px; height:

JavaScript 图片切换

强颜欢笑 提交于 2019-11-29 03:32:20
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style> p { margin:0; } body { text-align:center; } #content { width:400px; height:400px; border:10px solid #ccc; margin:50px auto 0; position:relative; } #content a { width:40px; height:40px; background:#fff; filter:alpha(opacity:80); opacity:0.8; position:absolute; top:160px; font-size:18px; color:#000; text-align:center; line-height:40px; text-decoration:none; } #content a:hover { filter:alpha(opacity:30); opacity:0.3; } #prev { left:10px; } #next { right:10px; } #p1 {

CSS中position和float的使用

安稳与你 提交于 2019-11-29 03:13:41
近期会更新一系列博客,对基础知识再度做个巩固和梳理。 一、 position定位 (一): position的属性    1.absolute:生成绝对定位的元素,相对于最近一级定位不是static的父元素来进行定位;    2.relative:生成相对定位的元素,相对于其所在普通的文档流位置进行定位;    3.static:默认值,没有定位,元素出现在正常的文档流中;    4.fixed:老IE不支持,和absolute一致,相对于窗口进行定位,当出现滚动条时,不随着滚动而滚动;    5.sticky:(CSS3)有兼容性问题,它就像是relative和fixed的合体,当在屏幕中时按常规流排版,当卷动到屏幕外时则表现如fixed。该属性的表现是现实中你见到的吸附效果。 (二):关于 position使用一般会引发的问题    1.假如有一个默认100%宽度的div,一旦加上absolute绝对定位,该元素立马inline-block化,默认宽度就会自适应元素内部宽度,会导致页面的宽高塌陷。    2.由于absolute绝对定位的灵活性,对于普通的页面布局,有时出于省事的原因很容易造成absolute/relative/top/left/z-index的滥用,这样会使后期的扩展和维护造成麻烦 (三): position代码示例    1.relative相对定位。   

Django Get Absolute URL

故事扮演 提交于 2019-11-29 02:29:46
问题 I want to get absolute url in templates. I can't do with url. It gives me a relative URL. I need to get this: http://domain.tld/article/post but Django gives me just /article/post I played with settings.py but it didn't work. (debug=false, allowed hosts vs.) Template code: {% url 'blog:detail' blog.slug %} 回答1: This is easy to do in a view. For example: from django.core.urlresolvers import reverse def Home(request): posts = Article.objects.filter(published=True).order_by('-publish') site =

Getting URL of executing JavaScript file (IE6-7 problem mostly)

好久不见. 提交于 2019-11-29 01:18:40
Hey all, I've been trying to throw together a generic function that retrieves the absolute URL of an executing JavaScript file on a web page: http://gist.github.com/433486 Basically you get to call something like this: getScriptName(function(url) { console.log(url); // http://www.example.com/myExternalJsFile.js }); inside an external JavaScript file on a page and can then do something with it (like find the <script> tag that loaded it for example). It works great in almost all the browsers I've tested (Firefox, Chrome, Safari, Opera v10 at least, and IE 8). It seems to fail, however, in IE 6

PHP: Get absolute path from absolute URL

拥有回忆 提交于 2019-11-28 11:23:56
I have an absolute path of a file, Is there a way to get the file absolute path http://domainname/rootfolder/filename.php and I wanna get something like /home/domainname/public_html/foldername/filename.php You can use the parse_url function to get the local part of the URL. Converting that into a file path then requires that you know where the document root of the webserver is. If it is the same server as the one the page is running on, then you can usually get that from $_SERVER['DOCUMENT_ROOT'] . It also depends on there being nothing preventing the URL from not being a direct mapping onto a

Absolute file path for java script

好久不见. 提交于 2019-11-28 11:21:35
I have a small javascript library written by myself. I want to reference it in my web application, but it doesn't work <script src='file:\\C:\Path\To\Script\Script.js'></script> Is it possible to reference javascript when all you know is the absolute path? The file: url needs 3 forward slashes, and the path also needs forward slashes: <script src='file:///C:/Path/To/Script/Script.js'></script> This will ofcourse only work if you load the script within a html-file on your disk that's loaded in your browser. Though I'm a Mac guy, my (limited) understanding of Windows security is that it has

左边定宽,右边自适应以及三栏布局

那年仲夏 提交于 2019-11-28 09:55:46
1、左边定宽,右边自适应 1.左边设置浮动,右边宽度设置100% .left{float:left} .right:{width:100%} 2.父容器设置display:flex right部分是设置flex:1 3.左设置浮动,右用cacl去补宽度计算 .left{float:left} .right:{width:cacl(100vw-200px} 4.首先修改页面结构,为自适应部分添加容器 .container, 同时改变左右部分的位置 2、三栏布局 样式: <style media="screen"> html *{ padding: 0; margin: 0; } .layout article div{ min-height: 100px; } </style> 1、浮动布局 <section class="layout float"> <style media="screen"> .layout.float .left{ float:left; width:300px; background: red; } .layout.float .center{ background: yellow; } .layout.float .right{ float:right; width:300px; background: blue; } </style> <h1>三栏布局<

Absolute Position of Chart Using VBA

余生颓废 提交于 2019-11-28 09:54:46
问题 I can use VBA to create a clustured column charty using the following code: ActiveSheet.Shapes.AddChart.Select ActiveChart.ChartType = xlColumnClustered However this is normally positioned in the centre of my screen. I can have it moved using code such as the following: ActiveSheet.Shapes("Chart 1").IncrementLeft -650.4545669291 ActiveSheet.Shapes("Chart 1").IncrementTop -295.9091338583 However this is only relative to its original position. Is it possible to set it that will always be