1> How to enter a space in DW?
The problem of entering spaces seems to have become a commonplace issue in DW. We may have seen it N times in many books or articles introducing the use of DW.
The restriction on space input in DW is for the "half-width" text state, so it can be avoided by adjusting the input method to full-width mode. The method is: open the Chinese input method (take artificial intelligence ABC as an example), press Shift +Space to switch to full-width state, it should be fine now.
In addition, you can also achieve the purpose of entering spaces through many "workaround" methods. For example, the commonly used ones are:
directly adding the HTML code " " representing spaces in the source code; after entering a text object of a certain length, then adjust the text The color is the same as the current background color, etc., but note that the latter may display problems in some browsers.
2> How to add a customized small icon in front of the browser address bar?
Do you remember that sometimes when browsing the homepage of the NetEase website, a small icon with the word "Easy" will be displayed in front of the address WWW.163.COM . By default, this icon is a designated picture of the IE browser.
In fact, this is not a sophisticated technology, it just adds a specific file to the website directory.
At this time, we need to make an icon file in advance, with a size of 16*16 pixels. The file extension is ico and then uploaded to the corresponding directory. Add the following code between the HTML source files "<head></head>":
<Link Rel="SHORTCUT ICON" href="http://The address of the image (note that it corresponds to the directory just now)">
The " SHORTCUT ICON" is the name of the icon. Of course, if the user uses IE5 or above to browse, it will be even simpler. Just upload the image to the root directory of the website and it will be automatically recognized!
3> Why does my originally well-designed web page become ugly and embarrassing when the browser window is minimized?
This should be an issue worthy of everyone's attention. In other words, there is no problem at all when browsing web content in full-screen mode. The problem slowly arises when we use the window minimize command or manually resize the window. The content of the web page will take the current window as the display range and fall in sequence. For example, the difference between "automatic line wrapping" and "no line wrapping" in Notepad is exactly the same.
To solve this problem, we must start with the layout of the web page. Under normal circumstances, the positioning of web content is mostly achieved through tables. Therefore, the "fault" in the problem lies in the form.
Please look at the property panel display of a table below:
You may have noticed that two different types are provided for the height and width setting options of the table, percentage and pixels. The use of percentages will cause the problem mentioned earlier. Just correct it to the actual size of the Pixels unit.
4> How to change the prompt message at the top when the web page is displayed?
When browsing a web page, the prompt information at the top often represents the key content of the web page, helping visitors to understand the content of the web page in advance. Before DW4, this operation was not directly provided in the function. We often completed it by applying the "title" attribute in the source code. Entering DW4 is much simpler.
Just type the required text information directly into the "title" input box at the top of the editing window.
5> How can I add a border of a specified color to a picture?
For pictures without borders, the display effect is quite poor when inserted directly into a web page. Remember that it is quite troublesome to add satisfactory borders to pictures in Microsoft FP.
However, it is much easier in DW, because there is a "Border" property that allows you to directly set the width of the border.
After the width is set, you will definitely ask, what about the color? There is no color choice on the panel! Haha, actually there is a trick here. Use the mouse to select the picture object. Be careful not to click to select, but to drag to select. Just do it the same way as setting the text color.
6> How to add prompt information for pictures and link text?
When we browse a web page, when the mouse stays on an image object or link, a prompt message box sometimes appears on the lower right side of the mouse. Make some comments about the goal. In some cases, its role is very important.
Let's first look at adding image prompt information. Select the image object and you will find an "Alt" input box in the properties panel. By default, this input box is blank. Just enter the required prompt content here.
Then the production of link prompts is not so simple. Because this function is not directly provided in DW, we need to add HTML code to achieve it.
Add the "title" attribute in <a href="" >. title=prompt content is enough.
7> How to make your own ZIP or other types of files available for others to download?
In the eyes of many junior web page creators, it seems that completing the download with a mouse click is a very "mysterious" thing, but in fact it is far from that. In When any format file in DW that is not recognized by the browser (other than HTM, HTML, ASP, PHP.PERL, SHTML, etc.) is used as a link target, the default operation is to download.
At this time, you only need to download the browser Write the file name, and then create a link to the target file. Be careful not to make a mistake in the directory.
8> How can we ensure that the text in the web page does not change with the browser font size setting? As
we all know, in the IE browser In the function settings, there is a function that allows you to freely set the font size of the window content. In this way, due to the habits of different visitors, the web pages presented to them will sometimes be different.
For example, you may have originally used a size 2 font in your design, but due to the user's additional browser settings, it has become larger. At this time, there will be a problem with the display effect.
Then the solution is to qualitatively force the web page content to a certain appropriate size. That is, he is not allowed to change. This requirement can be achieved by mandatory control of fonts through CSS style sheets.
9> Open the target link as a new window?
Open in a new window, as the name suggests, means opening another browser window without covering the current window. You can <a href="">add "Target=_blank" directly to the connection code.
If your HTML is poor, this setting is also provided on the DW properties panel. When you type the WWW URL in the Link input box, the Target drop-down box behind is also activated at the same time.
Just select "blank" at the top.
10> How to prevent an advertising window from popping up when a web page is loaded, like many commercial websites.
This is often seen in many large commercial websites. It can be easily implemented in DW through Behavior behavior.
Since it is loading, we can treat the entire web page content as an event object. Click the "<body>" tag in the lower left corner of the DW editing window. At this time, you can notice that all the web content has been selected.
Click the "Behavior" button in the "Quick Launchpad" to enter the behavior panel and
select the "Open Browse Window" item. At this time, you can also customize the window style, such as size, retention of tool buttons, etc. Another point is don't forget that the corresponding event is "Onload".
11> There is no "Timelines" in my quick launch pad, what should I do?
After DW was upgraded to version 4, several new projects were added to the quick launch pad, such as Assets and so on. At this time, the Timelins button originally on top was squeezed down.
Of course, if you are eager to use it now, you can still find it through the menu "Windows"-"Timelines". But after all, it is not as convenient as putting it in the launchpad. At this time, we can add it through the settings!
"Edit"-"Preference" enter the window, select "panels" in the project list on the left,
click the "+" button above, and select "Timelines" from the drop-down list. At this time, the timeline has been automatically added to the current "Show in Launcher" list content, OK. In the changed "Launcher" panel
, you can also freely select the button options that appear in the panel according to your own needs to improve work efficiency.
12> Create a web page so that it can be automatically refreshed every 5 minutes. How to achieve this?
When browsing the Internet, we often encounter some web pages. If there is no response after a period of time, it will automatically refresh. In addition to serving the purpose of reminding visitors, when the new refresh address is not the current URL, the function of automatic jump is implemented.
Whether it is repeated refresh or automatic jump. In web design, they are all very practical operations. Below we introduce how to make them.
Select the "Head" section of the DW "Object" panel. Note that by default, the "content" of Common is displayed.
Click the "Refresh" button above,
enter the refresh delay time (unit: seconds) in the "Delay" input box, and "Action" is the target URL specified for refresh. Because we are refreshing the current page, just select the menu option "Refresh This Document".
13> How to define the keyword (Keyname) of a web page?
When users use search engines to search for web pages with suitable content, keywords play a role that cannot be ignored. Most search servers will automatically detect whether new web pages are generated on the network at regular intervals and record them by keywords to facilitate user queries.
Of course you want your web page to appear in the query return list of search engines. At this time, the definition of keywords is particularly important.
Also in the "Head" panel,
click the "Keywords" button and
enter the keywords that need to be defined one by one. Note that each keyword is separated by a ";" sign, and there is no limit to the number.
14> How to hide some unnecessary labels in the editing window?
When the user inserts too many invisible elements into the web page, a row of corresponding labels will be displayed at the top of the editing window to facilitate the user to find them at any time. Although these tags themselves do not affect the display effect in the browser, if there are too many of them, the content of the web page will often have to be misaligned, thus hindering the visual adjustment of the web page to a certain extent. So how can we remove these things?
Enter the "Preperence" panel, select "Invisibel Elements" in the list, and
check the "checkmarks" in front of the items you do not want to display, such as Scripts, etc.
15> Arrange the display content of browsers that do not support "frames"?
We know that there are many types of browsers currently, so the first thing we consider when designing a web page is often "Will this thing be displayed well in different browsers?". Frames are an example!
But to avoid this, it's very simple, you just need to add the following content to the source code.
< BODY><noframes> --- This webpage contains frame structures. If you cannot display them normally, please download a new browser version or change to a mainstream browser --- < /noframes></ BODY>
16> How to Prevent others from putting your web page in a frame?
Some people with bad intentions often steal the fruits of other people's work, such as putting other people's carefully crafted web pages into their own frames in the form of sub-pages.
So how to prevent your web content from being "stolen"?
You only need to add the following code content between <head></head> of the web page source code:
<script language="javascript"><!--
if (self!=top){top.location=self.location;}
-->< /script>
17> How to add comment content?
Annotation content, as the name suggests, only appears as explanatory content, so it will not appear on the web page when browsing. Its function is to mark certain important or complex codes as necessary so that they can be found more easily and quickly.
Enter the "Invisibel" section of the "Object" panel (that is, invisible elements), select the Insert "Comment" button, and
type the necessary information in "Comment". If you return to the source code at this time, you will see that these operations add nothing more than a piece of code in the following format:
<! --This is the annotation content that needs to be filled in-->
18> Horizontal line, why can't the color be set?
In DW, when inserting a horizontal line through the menu "Insert" - "Horizonal Rule", you will find that there is no setting for the color of the horizontal line in the properties panel, because the earliest NC does not support the tag <hr> (HTML code for horizontal lines) ) COLOR attribute, so DW has no settings for it.
It seems that if necessary, we can only directly enter the source file to make changes.
<hr color="Corresponding color code">
19> How to set the function that can close the current window?
Here we can first enter the text used to mark "Close Window", drag it with the mouse to select it, type "/" in the "Link" input box, and cut into the source code window at the same time, type the event -onclick= in the link code "javascript:window.close(); return false;".
The complete code is: < a href="/" onclick="javascript:window.close(); return false;">Close window</a>
Of course, you can also replace the text "Close window" with other objects. Such as pictures, buttons, etc.!
20> What about windows that automatically close at scheduled times?
The function of closing the window is mentioned above, so how is the automatic closing now implemented?
Add the following code after the source code <body>:
<script LANGUAGE="javascript"> <!--
setTimeout('window.close();', 10000);
--> </script>
The set Timeout is a function used to set the delay time, where 10000 means 10 seconds.
21> How to change the "shape" of the mouse in the browser?
Generally, the mouse appears in the style of "arrow" in the browser, so can we change it to other styles we like?
Changing the shape of the mouse is implemented in DW through the "CSS style sheet".
Menu "Text" - "CSS style" - "Edit style sheet", the editing window of the style sheet will pop up, you can also click the CSS style button in the quick launch pad to find it, click "New" button, select the default "Make custom style", and in the Define below, make this style only apply to the current web document, "This document only". Select "Extensing" from the list items on the left of the "Style Definition" window, and set the corresponding settings on the right in "Cursor" (mouse). Pull down to select the appropriate shape. After confirmation, return and press F12 in the browser. Observe the effect. If you are not satisfied, you can also modify the style.
22>How to remove the underline under the link text?
After we complete the link creation, the link text content is often automatically added with an underline below to indicate that the content contains a hyperlink. When there are many links in a web page, it seems a bit cluttered. In fact, we can easily remove them. Also enter the "Edit style sheet" window, click "New" to establish the new style. In the Type here, you need to select "Redefine HTML Tag", and at the same time select the "a" representing the hyperlink in the specific tag Tag. ” and click OK.
Edit this style, select "Type" in the list on the left, and check the "None" checkbox in "Decoration". At this time, the underline of the link text in all web pages will be removed.
23> How to make the mouse “hover” over the link text produce discoloration, deformation and other effects?
When visiting a website, one of the most common effects we encounter is the "mouse-over response". The so-called "mouse-over response" is manifested in the link text, including changing the color and modifying the effect (underline, center stroke). line) and other options.
Since this effect plays a very good role in emphasizing the target content, it is applied to both personal websites and some large commercial websites (such as Sina, Sohu, NetEase, etc.).
In the previous question, you already knew how to remove link underlines, so I won’t go into details here. The following question will be how to add the process of mouse response event.
Also enter the "Edit style sheet" window, click "New" to establish the new style, the difference is that now select the last item in the Type type - "Use CSS selector", select "a:hover" in the "Selector" menu OK , enter the editing style window, and set the text color in the "Type" item to "red". Of course, you can also add an underline effect when the mouse is hovered.
24>How to prevent the background image of the web page from scrolling with the content?
Background images are something that many web designers often add. When the content of the web page exceeds one screen, the background image will scroll together with the content relatively still when the scroll bar is pulled. So, can the background be locked and not scroll along? Of course, you can enter the "Edit style sheet" window, click "New" to establish a new style, select "Redefine HTML Tag" in TYpe, select "Body" in the Tag menu, and select "Background" in the list on the left. Set "Attachment" to "fixed". Where scroll represents the default scrolling display.
25> You must know background music, how to add it?
In Microsoft's web tool - Frontpage, there is a background music setting function, but DW obviously does not do this, so if you want to use it, you can only add it manually in the source code.
Before using it, I would like to remind everyone that when using background music, you must pay attention to the size of the web page file, and do not lose sight of one thing or the other. The code is as follows:
<EMBED src=”music.mid” autostart=”true” loop=”2” width=”80” height=”30”>
Among them, src specifies the location of the music file, autostart is the action after the music file is uploaded, true means automatically starting to play, false does not play (default value).
27> How to automatically add the changed date to the web page?
Just add the following code between the source files <body></body>.
<Script Language="javascript"><!--
document.write("Last Updated:"+document.lastModified);
-->< /Script>
is displayed in the browser as: "Last Updated: 2001/8 /19”
28> How to control pop-up POPUP information?
Sometimes, when we click on a link, there will be some emphatically explained prompt information, that is, a pop-up message. For example, when a link has not completed the production of the target content page, you can use POPUP information to explain it.
Enter the link text at a suitable location on the web page, select it, and create a link in the properties panel. While still selected, click the "Behavior" button in the quick launch pad,
click the "+" sign in the upper left, select "Popun message" from the list, enter the information to be prompted in the subsequent window, and
set Set the mouse event (Events) of this action as click (onclick). The preview effect in the browser is as follows
29> How to hide the URL address information in the status bar of the browser?
When browsing the web, when the mouse stays over a link, the link target address will be automatically displayed in the status bar below. Considering security issues, sometimes we need to reset it to "zero", that is, set it to blank.
Now you only need to do some tricks in the link code to achieve it,
< a href=http://tech.163.com/school onMouseOver="window.status='none';return true">NetEase Academy</a >
30>How to change the prompt text in the status bar?
By default, when a web page is loaded, the address and other information of the web page will be displayed in the status bar. Do you want to make it more attractive?
In the DW "Behavior" behavior panel, click the "+" sign to select the "Text Of Status Bar" option under "Set Text Set", and
enter something like "Welcome to this website-" in the "Set Text of Status Bar" window. -Message messages such as "Network Management Message".
31> How to establish a form processing method for emails?
Forms should be an indispensable element in the interactive function of web pages. The function of a form is due to the interaction of information, so the processing of forms often involves the use of high-level network programming languages. You may say ,Wow! I can't program! It doesn't matter, in fact, some simple form content processing can also be achieved by email.
First look at the following code:
<form name="content" method="post" action="Handler to be used" ></form>
The above is the HTML source code of a typical form, in which METHOD determines the method, including There are two types: POST and GET. ACTION is the handler we mentioned above, which can generally be implemented through ASP/PHP/CGI.
So how to do it using email? action=mailto:[email protected], so when the submit button is clicked, a prompt window will pop up. Click "OK" and the form content will be sent to the specified mailbox.
32> How to create a standardized email link?
The so-called "email link" means that when we click it, the browser will automatically call the default mail client program to send an email.
Enter the words "PROBLEM MAIL ME", drag the mouse to select it, switch to the properties panel, and type the following command in the LINK input box:
Mailto: [email protected] ? Subject=letters from netizens&bc=other email addresses&bcc=other email addresses. Among them, Mailto is the protocol of the email link, Subject is the title of the email, bc is the email address to be copied at the same time, and bcc represents blind copying.
33> How to create an "empty link"?
An empty link is a link without a link object. In an empty link, the target URL is represented by "#". That is to say, when making a link, just enter the # mark in the LINK input box of the property panel, and it will be an empty link.
The appearance of empty links involves many factors, such as some pages that are not completed regularly, and in order to maintain consistency in page display (the link style is different from the ordinary text style), you can use it.
34> When clicking an empty link, the page often resets to the top of the page. How to deal with it?
In the browser, when we click on an empty link, it will automatically reset the current page to the first page, thus affecting the user's normal reading content. Of course, we hope that it will remain unchanged.
At this time, you can use the code "javascript:void(null)" to replace the original "#" mark. Looking back, the problem has been solved.
35> How to customize links that can jump freely within the page?
If you often subscribe to some free e-magazines online, you must be familiar with this kind of "tab link". Through a directory-like list, you can easily jump to any part of the page. Undoubtedly, its use is specifically for Designed for "extremely long content" web pages.
First determine where the link points, that is, where it will stay after the screen jumps. Enter the "Invisibles" section of the "Object" panel, select the target text, click the "Insert Named Anchor" button, type the label name in the "Anchor Name", OK, then a red dotted line will automatically appear under the text to distinguish it from ordinary text content, note that they will not appear in the browser.
Then you can create a link and enter "#nchor Name (the name just now)" in the LINK input box of the property panel. Of course, if you want to point to a certain location on another page, you can also just put this little tail there.
36> What should I do if I create many links on one picture at the same time?
This problem is what we usually call "Image HOT". Of course, there is another name in DW called "Image Hot Area".
Select the picture. At this time, there is a "Map" toolbar in the lower left corner of the property panel. On the right are three buttons for delineating different areas. Take the rectangle tool as an example. After selection, when the mouse stays on the picture, It is displayed in a "+" shape, which means it can be dragged left and right. After completion, you can complete the link creation of multiple hotspot areas. Note that areas cannot overlap.
37> How to create a flip image that can respond to mouse events?
In many web pages, we often see some column titles, which can change into something else when the mouse rolls over them. In fact, many of them are achieved by using two different pictures, which is the so-called "flip picture" effect.
Of course, you must first prepare two pictures of exactly the same size in advance to ensure that there will be no visual discomfort when flipping. Click "Rollover Image" on the "Object" panel to pop up the "Rollover Image Settings" window. Click respectively. The "Browse" button determines the addresses of "Original image" and "Rollover image". Be sure to select the "Preload Rollover image" checkbox below, otherwise there will be a certain download delay when the mouse slides over and affect the effect.
38> How to create a picture of “flying all over the sky”?
On the homepages of many large commercial websites, you will often see a lot of advertising pictures floating back and forth. After clicking, you can link to the specified address. In DW, this is achieved through Timelines.
First, insert the target image into the web page, select it at the same time, click the "Timelins" button in the quick launch pad to enter the "Timeline" window, right-click on the 1frame of the timeline, and select "Add Object". At this time, the timeline A blue color bar will appear on the screen (default 1-15frame), stop the camera at 15frame, and move the picture on the page to the end position of the movement.
Now that a simple motion animation is complete, you can adjust the curvature of the path by adding a keyframe in the middle. Click the right arrow button above to preview the effect.
39> How to create a "statically suspended" image on the page?
The so-called "static suspension" means that the picture always tries to stay at a certain position on the web page, so it visually feels like it is "walking" with the page, as if it is suspended.
The realization of this effect is accomplished through javascript, which generally requires certain programming capabilities. Fortunately, DW provides a fixed plug-in for creating this effect, so it is much simpler.
First, you must download the stav plug-in and copy the two files inside (including the image file Cross Browser Static Division.gif and the web page file Cross Browser Static Division.htm) to the DW installation directory ConfigurationObjectsCommon.
Restart DW. In the Object panel, you will see that there is an SI item at the bottom. Select it and set the distance from the floating layer to the top and left in the pop-up window, and then insert the specified Just the content (pictures here).
40> How to make text and image content coexist?
We all know that in DW, picture objects often occupy one line, so the text content can only be placed on a line parallel to it. How can the text be displayed around the picture?
Select the picture, you can see an "Align" property menu in the upper right corner of the property panel, select "Left", and then you will find that the text has been evenly arranged on the right side of the picture.
41> Realize the connection of multiple windows?
Panel design has always been a major feature of DW. In the DW4 version, there are already quite a lot of panels used. So how can we use it more efficiently? "Window connection" is a technical function that is convenient for everyone to customize. Simply put, it means that you can put two or more panels into one window as needed. Click and drag the tab bar of one panel to two panels. When you see a black border, release the mouse. At this time, the two panels have merged into one.
42> How to make a thin line with a width of 1?
In DW, although the horizontal line appears in the form of "Line", when making thin lines, it does not perform satisfactorily, mainly because it is too thick and does not have the required delicacy!
Then we can adopt a flexible method to implement it through the application of tables.
Insert a table with 1 row and 1 column into the web page, set the "cellpadding" and "cellspacing" of the table to "0", and set the "bgcolor" of the cell to red. Of course, you can also use other colors. Instead, "Height" sets the height to 1.
The most critical step is to check the source code and remove the " " in <td>< /td>.
43>How to make a square with a border of 1?
Obviously, we still have to complete the table settings now.
Maybe you will say, this is not simple! Just create a table with 1 row and 1 column, and then set its "Border" value to 1. In fact, the table made in this way is not at all a square with a border of 1, but is much "thick"!
Similarly, first insert a table with 1 row and 1 column, set the "border" and "cellpadding" of the table to "0", and set the "cellspacing" to "1". Set the "bgcolor" of the table to red (that is, the color of the border), and set the "bgcolor" of the cell to white (that is, the same background color). OK.
44> How to set up different browsers to return different pages?
Different browsers support different technologies and effects. Therefore, the web pages we design may not display properly or optimally in all browsers. At this time, a jump to determine the browser is necessary.
When the user opens it with different types or versions of browsers, different pages can be returned to ensure the user's normal browsing. Click the "Behavior" button in the quick launch pad, click the "+" sign, and select "Check Browse" in the drop-down list.
45> How to create objects that can be dragged anywhere on a web page?
When visiting a website, you often see many elements that can be dragged with the mouse, mostly pictures. For example, if an advertising picture blocks the content you want to browse, you can select it with the mouse and throw it aside!
This effect is achieved through the "Drag Layer" behavior of the layer. Click the "+" sign in the Behavior panel and select "Drag Layer". Of course, you must ensure that the target layer is selected before doing simple settings. OK.