mfc菜单建立响应步骤_设置以建立响应性网站

news/2024/5/20 22:20:35/文章来源:https://blog.csdn.net/culuo8053/article/details/107932096

mfc菜单建立响应步骤

Eric Wendelin is one versatile dude. When I met him he was writing Java at a small startup called Sun / Oracle, and now he's writing front-end code for a startup -- that's a big leap. With this responsive design post, Eric flexes a little muscle and shares his process for putting together a responsive website.

埃里克·温德林(Eric Wendelin)是一位多才多艺的家伙。 当我遇到他时,他在一家名为Sun / Oracle的小型初创公司中编写Java,现在他正在为一家初创公司编写前端代码-这是一个巨大的飞跃。 通过此响应式设计帖子,Eric发挥了一些作用,并分享了他建立响应式网站的过程。

Not long ago, the biggest challenge for a web engineer was making sites that worked well in several different browsers. While that is still the case, our challenge is shifting to supporting the growing number of devices. I have come across a few tools and paradigms that helped me make this shift. Some ideas cannot be easily expressed in words; truly the best teacher is experience. Make a committment to yourself to grind your mental axe on this skill.

不久前,对于Web工程师来说,最大的挑战是使网站在几种不同的浏览器中都能正常运行。 虽然情况仍然如此,但我们的挑战正在转向支持越来越多的设备。 我遇到了一些帮助我做出这一转变的工具和范例。 有些想法很难用言语表达; 真正最好的老师是经验。 对自己做出承诺,以磨练您的思维能力。

The first thing I want to say is in regards to design. You cannot have a responsive site without a responsive design. I recommend taking a "mobile first" approach because it forces you to focus on the most critical elements in your app. Once the most important elements are established, the rest can be deemphasized or taken away on smaller screens. This isn't really a dev tip — for the rest of the article I'll assume you have a polished design that must adapt to various screens.

我想说的第一件事是关于设计。 如果没有响应式设计,就无法拥有响应式网站。 我建议您采用“移动优先”的方法,因为它会迫使您专注于应用程序中最关键的元素。 一旦建立了最重要的元素,其余的元素就可以不再强调或在较小的屏幕上删除。 这并不是一个真正的开发技巧-在本文的其余部分中,我将假定您具有必须适应各种屏幕的优美设计。

Chrome开发人员工具设置 (Chrome Developer Tools Setup)

Chrome has an awesome feature that helps emulate other devices. Open the Developer Tools and find the gear in the lower-right for the settings. Go to the Overrides tab and check the User Agent box, then select a device from the dropdown list. Chrome will automatically populate the device metrics and scale the viewport accordingly. The arrow button on the right changes the orientation of the "device". You can also emulate touch events.

Chrome具有出色的功能,可帮助模拟其他设备。 打开开发人员工具,然后在右下方找到设置的齿轮。 转到“ 替代”选项卡并选中“ 用户代理”框,然后从下拉列表中选择设备。 Chrome会自动填充设备指标并相应缩放视口。 右侧的箭头按钮更改“设备”的方向。 您还可以模拟触摸事件。

Chrome Dev Tools - Overrides

I use this to really dig into the layout for a specific device. Theoretically, you could open multiple Chrome tabs and set them to different devices, but that's cumbersome. I have a tool I use for that.

我用它来真正挖掘特定设备的布局。 从理论上讲,您可以打开多个Chrome标签并将其设置为不同的设备,但这很麻烦。 我有用于该目的的工具。

响应式设计书签 (Responsive Design Bookmarklet)

Lennart Schoors and Benjamin Keen developed a really neat bookmarklet that creates a series of <iframe>s containing various resolutions of the current page. I use it to test a bunch of resolutions at the same time to make sure the layout responds correctly on a wide range of devices.

Lennart Schoors和Benjamin Keen开发了一个非常整洁的书签 ,该书签创建了一系列<iframe>其中包含当前页面的各种分辨率。 我使用它来同时测试一系列分辨率,以确保布局在各种设备上都能正确响应。

Here are the resolutions I usually use (based on my Google Analytics data + speculation):

以下是我通常使用的分辨率(基于我的Google Analytics(分析)数据+推测):

  • 480x800 — Generalized Smartphone/Nexus S Portrait

    480x800 —通用智能手机/ Nexus S肖像
  • 800x480 — Generalized Smartphone/Nexus S Landscape

    800x480 —通用智能手机/ Nexus S风景
  • 640x960 — iPhone 4S Portrait

    640x960 — iPhone 4S肖像
  • 960x640 — iPhone 4S Landscape

    960x640 — iPhone 4S横向
  • 640x1136 — iPhone 5 Portrait

    640x1136 — iPhone 5肖像
  • 1136x640 — iPhone 5 Landscape

    1136x640 — iPhone 5横向
  • 768x1024 — iPad Portrait

    768x1024 — iPad纵向
  • 1024x768 — iPad Landscape

    1024x768 — iPad横向
  • 720x1280 — Samsung Galaxy Nexus Portrait

    720x1280-三星Galaxy Nexus肖像
  • 1280x720 — Samsung Galaxy Nexus Landscape

    1280x720-三星Galaxy Nexus景观
  • 1440x900 — Generalized Laptop

    1440x900 —通用笔记本电脑
  • 1920x1080 — Generalized Monitor

    1920x1080 —通用显示器

You can use your favorite dev tools to inspect any given viewport, but you can't change all of them at the same time. If you need to click around and check out multiple different devices simultaneously, use Adobe Shadow Edge Inspect.

您可以使用自己喜欢的开发工具来检查任何给定的视口,但不能同时更改所有视口。 如果您需要单击并同时签出多个不同的设备,请使用Adobe Shadow Edge Inspect 。

Adobe Edge检查 (Adobe Edge Inspect)

Adobe Edge Inspect Extension

The previous setups have some major gaps (such as pixel density and font scaling) that are tough or impossible to emulate without using a real device. You can use various emulators or Apple's shiny new Remote Debugger in Safari 6 but that is (currently) only for iOS devices and only if you're non-mobile computer is a Mac. Weak.

先前的设置存在一些主要差距(例如像素密度和字体缩放),如果不使用实际设备,这些差距很难或无法模拟。 您可以在Safari 6中使用各种仿真器或Apple全新的闪亮的Remote Debugger,但这(当前)仅适用于iOS设备,并且如果您使用的是非移动计算机则是Mac。 弱。

The free version of Adobe Edge Inspect allows you to preview and inspect your web pages in real-time on one mobile device. The paid version will allow you to work on multiple devices at the same time.

免费版本的Adobe Edge Inspect允许您在一台移动设备上实时预览和检查网页。 付费版本将允许您同时在多个设备上工作。

For this setup, you need to install the Edge Inspect native app on all of your mobile and non-mobile devices and install the Edge Inspect Chrome extension. Connect all devices, start Edge Inspect on them, and choose the computer you want to connect to. Now all of the mobile devices will one-way mirror your computer. Interactions on one mobile device is not mirrored on any other screen. You can also view and change HTML/CSS/JS/Storage with the inspector. Turn on the Chrome extension and click the <> symbol next to a device to inspect the page on it. Awesome!

对于此设置,您需要在所有移动和非移动设备上安装Edge Inspect本机应用程序,并安装Edge Inspect Chrome扩展程序 。 连接所有设备,在它们上启动Edge Inspect,然后选择要连接的计算机。 现在,所有移动设备都将单向镜像您的计算机。 一个移动设备上的交互不会在任何其他屏幕上进行镜像。 您还可以使用检查器查看和更改HTML / CSS / JS / Storage。 打开Chrome扩展程序,然后单击设备旁边的<>符号以检查其中的页面。 太棒了!

边缘检查+ LiveReload FTW (Edge Inspect + LiveReload FTW)

Using your favorite editor and seeing changes in real-time is the new hotness, and we can do just that using LiveReload. I recommend buying the Mac app because setting up Edge Inspect sync without it is tedious. You also need to install the Latest LiveReload extension for your browser. If you don't have a Mac, you'll need to use guard-livereload and livereload.js. For more help, see Adobe's guide to using LiveReload with Edge Inspect.

使用您喜欢的编辑器并实时查看更改是新的热点,我们可以使用LiveReload做到这一点 。 我建议购买Mac应用程序,因为没有设置Edge Inspect同步就很麻烦。 您还需要为浏览器安装Latest LiveReload扩展 。 如果没有Mac,则需要使用guard-livereload和livereload.js 。 有关更多帮助,请参阅Adobe的LiveReload与Edge Inspect结合使用的指南 。

The only drawback to the Edge Inspect and LiveReload system right now is that WebSockets are not supported by Android browsers (as of v4.1), so LiveReload doesn't work on Android.

目前,Edge Inspect和LiveReload系统的唯一缺点是Android浏览器(自v4.1开始)不支持WebSocket ,因此LiveReload在Android上不起作用。

Phew! Now we have a system that allows us to develop in our favorite editor and see changes on multiple screens at once! The setup is tedious, but well worth it. Nothing beats seeing and using the design on a real device.

! 现在,我们有了一个系统,可让我们在最喜欢的编辑器中进行开发并同时在多个屏幕上查看更改! 设置很繁琐,但值得。 在真实设备上看到并使用该设计无所不包。

其他资源 (Other Resources)

  • BrowserStack has a bunch of mobile emulators for iOS, Android and Opera Mobile that you can run remotely, and their service is cheap and awesome. Recommend.

    BrowserStack有许多适用于iOS,Android和Opera Mobile的移动仿真器,您可以远程运行它们,它们的服务又便宜又棒。 推荐。

  • I'm intrigued by Adobe Edge Reflow for layout development (not yet released).

    我对Adobe Edge Reflow的布局开发(尚未发布)很感兴趣。

  • Lastly, I love Majd Taby's article on setting up WebKit Inspector for development. All web developers should read it.

    最后,我喜欢Majd Taby的有关设置WebKit Inspector进行开发的文章。 所有的Web开发人员都应该阅读它。

Thank you to David Walsh, Divya Manian and Chris Coyier for their reviews and feedback on this article.

感谢David Walsh,Divya Manian和Chris Coyier对本文的评论和反馈。

翻译自: https://davidwalsh.name/responsive-css

mfc菜单建立响应步骤

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_727218.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Flutter 中文文档网站 flutter.cn 正式发布!

在通常的对 Flutter 介绍中&#xff0c;最耳熟能详的是下面四个特点&#xff1a;精美 (Beautiful)&#xff1a;充分的赋予和发挥设计师的创造力和想象力&#xff0c;让你真正掌控屏幕上的每一个像素。极速 (Fast)&#xff1a;基于 Skia 的硬件加速图形引擎&#xff0c;帮助你媲…

合并脚本和样式表_将脚本和样式供稿添加到您的网站

合并脚本和样式表Script & Style is a website created by myself and Chris Coyier where bloggers and developers alike submit articles about CSS, XHTML, jQuery, MooTools, and other website design and development topics. The sites popularity continues to gr…

vue网站案例_个人博客网站搭建

个人博客网站搭建VuePress介绍本人的个人博客网站&#xff0c;网站地址&#xff0c;是基于VuePress进行搭建。什么是VuePress根据官网&#xff1a;VuePress 由两部分组成&#xff1a;第一部分是一个极简静态网站生成器&#xff0c; 它包含由 Vue 驱动的主题系统和插件 API&…

如何将应用转换成系统应用_将网站转换为应用

如何将应用转换成系统应用Converting a website to a native app, whether on mobile or desktop, can be quite useful. The problem with bookmarks, especially for software engineers, is that we often need to work in different browsers, so having everything in on…

女朋友想让我的网站下点雪,我立马打开电脑…(附源码)

点击上方[全栈开发者社区]→右上角[...]→[设为星标⭐]前言女朋友常逛的设计网站这两天页面上多了下雪的效果&#xff0c;于是问我我的网站能下雪吗&#xff0c;作为一个程序员我一般会说实现不了&#xff0c;但是作为男朋友&#xff0c;不能说不行。雪雪我们可以使用span标签和…

amazon s3_在Amazon S3上托管网站

amazon s3Everyone knows that Amazon S3 is great for storing files. Its fast, inexpensive, and easy to setup. What you may not realize is that you can also host static websites on this robust platform. 众所周知&#xff0c; Amazon S3非常适合存储文件。 它快速…

linux文件服务器用途,文件服务器CPU篇 - 构建文件服务器:OS与CPU应用选择篇_服务器应用_Linux公社-Linux系统门户网站...

文件服务器CPU篇文件服务器的主要用途是存储&#xff0c;而不是处理能力&#xff0c;特别是家庭文件服务器而言&#xff0c;包括处理器在内部件都应该让位于硬盘、机箱和电源。文件服务器不需要最新的处理器&#xff0c;对于可能从来没必要将数据同时分发到多个客户机的文件服务…

必看,程序员应该访问的最佳网站

【公众号回复 “1024”&#xff0c;免费领取程序员赚钱实操经验】大家好&#xff0c;我是章鱼猫。今天给大家推荐的这个项目是「Best-websites-a-programmer-should-visit-zh」—— 程序员应该访问的最佳网站中文版&#xff0c;一些对程序员有用的网站。在学习 CS 的时候有一些…

查找微信公众号服务器,墨涩网 - 免插件实现微信公众号搜索连接wordpress网站文章——墨涩网...

微信公众号当前是每个用户都在使用的功能&#xff0c;而使用wordpress程序的站长会希望把自己的网站连接到微信公众号。连接后通过公众号访问网站的内容。目前网上有很多可以实现微信公众号和wordpress网站链接的插件很多&#xff0c;个人觉得醉的最好的应该是功能强大的水煮鱼…

php 网站语言切换,php 多语言切换

目录结构&#xff1a; // 文件内容&#xff1a; /include/language.php Java代码 ?php $languagesarray(); $languages[ zh-cn ][ name ] china ; $languages[ zh-cn ][ image ] flag1.jpg ; $languages[ en ][ name ] english目录结构&#xff1a;//文件内容&#xff1a;/inc…

突发:全球最大的同性交友网站挂了,修复长达四个小时的背后是一个悲伤的故事...

loonggg读完需要3分钟速读仅需 1 分钟今天下午&#xff0c;作为全球最大的同性交友网站&#xff1a;GitHub&#xff0c;突然挂了&#xff0c;一直在这两张图中间来回切换。再刷新一下&#xff0c;从 500 变成了小马&#xff0c;你还别说&#xff0c;我仔细看这个小马&#xff0…

2017年最受欢迎的10个编程挑战网站

来源&#xff1a;CSDN大数据 作者&#xff1a;Daniel Borowski 本文长度为1704字&#xff0c;建议阅读4分钟 如果你想不断地提高自己的编程技能&#xff0c;那么不断尝试去解决那些编程中的难题&#xff0c;这是一个非常不错的途径。本文为你列举了10个编程挑战网站&#xff0c…

透过日播放量超过6亿的《延禧攻略》,看2018视频网站格局

作者介绍徐麟目前就职于上海唯品会产品技术中心&#xff0c;哥大统计数据狗&#xff0c;从事数据挖掘&分析工作&#xff0c;喜欢用R&Python玩一些不一样的数据文章来源数据森麟如需转载&#xff0c;请联系原作者授权前言随着《延禧攻略》的播出&#xff0c;魏璎珞、富察…

看看黑客是如何攻破一个网站的?网友:原来...

点击上方[全栈开发者社区]→右上角[...]→[设为星标⭐]点击领取全栈资料&#xff1a;全栈资料通过本文你将了解黑客常用的入手思路和技术手法&#xff0c;适合热爱网络信息安全的新手朋友了解学习。本文将从最开始的信息收集开始讲述黑客是如何一步步的攻破你的网站和服务器的。…

有哪些网站,一旦知道,你就离不开了?

loonggg读完需要5分钟速读仅需 2 分钟大家好&#xff0c;我是你们的校长。感觉好久没有给大家分享工具类的好东西了&#xff0c;今天给大家分享几个好东西。作为程序员&#xff0c;一个技术人员&#xff0c;我从工作的角度和职场的角度给大家推荐几个非常不错的网站吧&#xff…

添加javascript_使用JavaScript将搜索添加到您的网站

添加javascriptStatic website generators like Gatsby and Jekyll are popular because they allow the creation of complex, templated pages that can be hosted anywhere. But the awesome simplicity of website generators is also limiting. Search is particularly ha…

不吸吮的网站建设者

我从不追求真棒 (I Never Pursue My Awesome Ideas) Im constantly struck with ideas for new web projects. Unfortunately, I rarely act on them because I have too little time and theyre too much of a hassle to see through. 我一直对新的Web项目的想法感到惊讶。 不…

GitHub Star 10K,让你的网站更炫酷的开源库

【公众号回复 “1024”&#xff0c;免费领取程序员赚钱实操经验】大家好&#xff0c;我是你们的章鱼猫。现在不少网站都支持了骨架屏&#xff0c;能够在网页数据加载前&#xff0c;展示固定的布局&#xff0c;能够减少用户在进入网页时感受到白屏的不适感。今天要给大家推荐一个…

bootstrap网站框架_启动框架:网站构建器,Bootstrap主题等

bootstrap网站框架One conclusion that Ive come to when evaluating my skills is that Im not a designer. Each time I redesign this blog, I identify a few sites I like and then meld them together. Of course that means I end up with UI components that dont lo…

牛逼啊,这两个程序员生财案例网站

loonggg读完需要4分钟速读仅需 2 分钟今天是日更生财技能的第二天。我决定每天写一篇生财感悟类的文章&#xff0c;带领大家每天「钱近」一小步。今天我读「生财日历」上 2 号的内容&#xff0c;上面讲的是一个变现超过 100 万美元的国外网课销售漏斗模型的案例。大致内容讲的就…