scrolling, and moving the mouse into the image to continue scrolling. This is achieved by eliminating the timer. The code is very simple and will not be introduced. I also set the image size to 160*120 for better style. You need to prepare the image yourself when running the code.
The Code is as follows:
The above is the detailed code for js to implement seamless rolling effects. I hope it will be helpful
Use the usual to pull the map is very common, but also very useful, learn to pull the map from the simplest we have to start from simple to complex, will be better grasp the pull map, then I will give you a brief introduction of the simple PS pull map, with rectangular marquee tool as an example
Tools/raw Materials
Photoshop
Method/Step
Open the Photoshop software and open the file you want to edit
Right-click the
Note: All are reproduced.First, one-line scrolling:--------Copy the following code directly to test reprint http://www.3lian.com/edu/2011/06-30/4986.html-------------------------------------------------------------------Multi-line scrolling, copy the code to achieve----------------------------Reprint http://www.cnblogs.com/dearxinli/p/3770803.html-------------------------------------------------------------
In the Android Apidemo, there is a button merry-go effect, but the change is TextView, or a little difference.
Define MERRY-GO (Marquee), mainly in Project/res/layout/main.xml
Copy Code code as follows:
Android:layout_width= "40px"
android:layout_height= "Wrap_content"
android:text= "Test marquee for TextView"
android:layout_gravity= "Center"
Android:ellipsize= "
Method: Use Layout controlThe contents of the page are placed in an element a that is as large as the Web page (there is a scrollbar in the content of element B)First, the body and HTML, element a set width:100%;height:100%;Element A is set Overflow:auto;Add a class= ' hidden ' to element aWrite style. hidden{Overflow:hidden;}Then write the JS code (native)var content=document.queryselector (element a);var conbox=document.queryselector (element B with scroll
The screen of a mobile phone is relatively small. Sometimes you need to use a text box (TextView or its subclass) to display a long line of text. One way is to cut the text, use... .
A common practice is to use Marquee to scroll text. This example describes the Marquee Effect of TextView.
Let's take a look at the definition of marquee. xml in layout:
[Html]Androi
TextView Simple EffectTextView Android:text="@string/longword"Android:layout_width="wrap_content"Android:layout_height="wrap_content"Android:id="@+id/textview1"android:ellipsize="Marquee"Android:singleline="true"android:focusable="true"Android:focusableintouchmode="true"/>TextView a few of the common properties of the marquee effect, of which ellipsize, Singleline, focusable, Focusableintouchmode are requir
Directly in the code, which is a good package layer that can be called directly//originally in vainBOOL Testlayer::init () {ccsize size = Ccdirector::shareddirector ()->getvisiblesize (); Create the text to be displayed text = Cclabelttf::create ("text\nbaibai\nfdffdd\nzimu\nhaha\njahjahjkd\njhahaj\n", "", 30); Text->setposition (CCP (100,-120)); Draw clipping area ccdrawnode* Shap = Ccdrawnode::create (); Ccpoint Point[4] = {CCP (0,0), CCP (0), CCP (n, N), CCP (0, 200)}; Shap->dr
To enable marquee with the animated effect (auto-scrolling forward and backward on the focused item) in the ListBox, you need to add the following code.
Column cell listbox (for example CAknSingleStyleListBox ):
IListBox-> ItemDrawer ()-> ColumnData ()-> SetMarqueeParams (3, 20,100 0000, 200000 );IListBox-> ItemDrawer ()-> ColumnData ()-> EnableMarqueeL (ETrue );
Formatted cell listbox (for example CAknD
Details about HTML scrolling subtitle code and parameters, and details about scrolling subtitle ParametersHtml text scrolling code
Marquee parameters:BGColor: the background color of the scroll text box.Direction: Set the scroll Direction. You can select Left, Right, up, and down.Scrolldelay: the delay time between
Marquee is a fixed text rolling label in HTML. Although it is easy to use, there are some functional limitations. In many cases, we use JavaScript to supplement this function. this Code enables constant speed, seamless, link addition, and other modifier effects. This function enables smooth scrolling of text from right to right, you can set the scroll width, height, and speed.
[Ctrl + A select all Note:
Let's take a look at the HTML attributes of Marquee.
Behavior = "... "
Bgcolor = "... "
Direction = "... "
Height = "... "
Width = "... "
Hspace = "... "
Vspace = "... "
Loop = "... "
Scrollamount = "... "
Scrolldelay = "... "
>...
Align: -- left, center, right, top, bottom (needless to say)
Behavior: -- used to set the scroll mode, mainly in three ways:
Behavior = "scroll" -- indicates rolling from one end to the other;
Behavior = "slide": -- indicat
Android TextView has two properties Singline and Maxlines. In the literal sense, both are the number of lines that limit text. So Singleline= "true" and maxline= "1" are all limited to one line, what's the difference?Let's take a look at Google Document's explanation:Android:maxlines makes the TextView is at most this many lines tall.Android:singleline constrainsThe text to a single horizontally scrolling line instead of letting it wrap onto multiple
In the classic forum to see the Netizen Jeanjean20 mentioned marquee how to modify to meet the standard. I looked at the friends of the thread feel very good, moderator GREENGNN indicated that marquee is not in line with the standard has been discarded. Have a friend big dozen uneven say feel go to unreasonable, originally very good effect now changed. Also have a friend said go to good, look at bored. Ever
The code is as follows
Copy Code
/*msclass (class of Marquee scroll Universal nonbreaking scrolling JS Encapsulation Class) Ver 1.65*Application Note: page contains To create an instance:Direct assignment method of parametersNew Marquee ("Marquee")New Marquee
TextView realize the effect of the marquee:Example one:This example can be solved to a textview realize the effect of the marquee, but can not solve all the textview to achieve the effect of the marquee. textview android:layout_width = "Wrap_content" = "Wrap_content" = "true" Android: Ellipsize = "marquee" android:focusable = "true" android:focusab
In a Web page, making a scrolling caption using the marquee tag is too much trouble if you use a handwritten method. It is recommended to use web-making software such as Dreamweaver to learn. You can use the tag Selector to insert various labels in the DW, and you can use the tag Inspector to set the label's property value, which is similar to the property panel, but is more powerful than the property panel
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.