惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - 随风

最后期限 修改KMP的Next函数 Sql Prompt Sql懒人助手 99:87 Oh no no no i'm a rocket man NBA 08-09 会考 新书到 涂鸦(3)雨点大, 伞子小 涂鸦(2)人妖 最美丽的光华和一张厚实的医保卡 涂鸦(1) ---- 理想 辞职牛信 Where the Next Happen? 盘龙峡 众里寻 E心情 Sql拼凑器 英语面板 生活死锁
Mac DockMenu
随风 · 2008-04-23 · via 博客园 - 随风

最近看到网页下的MacOS菜单导航效果很不错,效果http://www.ndesign-studio.com/demo/css-dock-menu/css-dock.html
于是决定用GDI+搞个出来,
向下飞的原理很简单,当鼠标移动的时候,计算鼠标位置和图片的距离在一定距离下进行对图片进行缩放, 然后重新调整位置就OK了。

 
向上飞要麻烦一点, 如果要跟向下飞一样动态改变 控件的高度的话,需要改变控件的Location
这样导致画图的时候Location在变, 高度在变,鼠标移动的时候晃的比较厉害,效果不好。
最直接的方法是直接定死控件的高度为图片的最大值高一点, 这样的话Location和Height都不变的情况下效果很不错。
可惜的是不能动态变了,这样这个控件的上面就需要预留一定的空间方便飞出来了。