search
HomeWeb Front-endHTML Tutorialaxure学习之路.第三弹_html/css_WEB-ITnose

这次我做的是一个简单的web版的一个简单的qq登录页面。

不过在此之前,我想分享一下自己刚学到的一个小tip,很多同学很想抠网站上的原图,但一般情况下都难以实现,如果直接鼠标右键点击然后另存为的话,存下来的一般是该网页的html。

正确的步骤应该是这样的:

首先请打开谷歌浏览器(其他浏览器不敢保证),然后任意位置点击鼠标右键,再点击审查元素

将会出现这样一个界面,在这里面就可以看到该网页的css、html、前端代码、网页里的图片等                      

然后看到最上方最右边有一个“resources”,点击“resources”:

会出现一个frames的文件夹,点击该文件夹,下方就会出现images这一栏目,点击images:

然后这就是该网页里面所有出现过的图片了,直接双击,会跳转到另一个html,然后再这个html里面,就可以直接右键另存为了,如果没有反应,重复上述操作在做一遍即可。

那现在进入正题吧。

首先,先看下这次做出来是个什么样子的。

大概就是这样子的,一打开首先选中在QQ账号这一页面,左边是三种不同的账号注册方式,下面是QQ账号的搜索栏。右边就是各个页面的具体交互了。

这次的这个交互有三个地方给我造成了一定的困难,所以我就着重说说这三个地方。

●左边三个不同页面的切换以及切换前后图标颜色的变化。

●右边交互界面输入框颜色的变化以及焦点位置的变化。

●如何保持多个下拉列表框中具有联系的内容的对应性。

一:左边三个不同页面的切换以及切换前后图标颜色的变化。

首先,先说三个页面的不同切换。

这里最方便最高效的方法应该是用动态面板去做。

每个分页面直接放到动态面板的几个不同的状态里,然后添加动作,选中切换时点击的图标以及图标旁边的小图片,然后再设置动态面板状态,使当前按钮与所对应的页面相一致:

然后接下来的就是随着页面的切换左边三个图标的颜色也随之改变。

这个时候就需要用到图片属性里面的选中按钮了,点击选中,在image一栏导入在切换时你想要变换的图片:

这样就可以,在不被选中时还是原来的图片,在选中时就会显示你所导入的图片。

二:右边交互界面输入框颜色的变化以及焦点位置的变化。

其实这个输入框是由两部分组成:一个矩形和一个文本框

想要达到点击时获取焦点并且外边框变成蓝色,离开时外边框变成红色的效果,首先,在外边框属性栏里设置选中时和禁用时的变化效果,选中时外边框设置成红色,禁用时设置成蓝色:

选中时外边框设置成红色

禁用时外边框设置成蓝色

然后接下来就可以直接添加动作了,鼠标单击时:外边框禁用(颜色变蓝),显示输入框(因为输入框的颜色和矩形有所不同,避免色差,所以先隐藏起来了),输入框获取焦点;然后再设置输入框动作:获取到焦点时,设置未选中外边框,然后禁用外边框(从而真正达到变蓝效果),失去焦点时,启用并选中外边框,外边框变红。好了,这样一系列动作就完成了。

三:如何保持多个下拉列表框中具有联系的内容的对应性。

就拿后面两个下拉列表,即:省市和辖区为例。

如何做到一一对应呢,当然,我们可以对省市进行一一判断,如果省市是北京,那么调整辖区所在的动态面板(辖区需要设置动态面板),使北京对应到相应的动态面板的状态中去,但是一旦数据量大了,这样做会非常麻烦,要录入的东西太多。

所以得换一种方法。

直接设置动态面板(辖区)的状态,选择状态为value,设置一个局部变量,然后把省市的数据赋值给该局部变量,然后再把动态面板状态给定到该局部变量:

然后它就可以自动匹配不同下拉列表里面有对应关系的数据了。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools