I want a page with two div's next to each other; on scroll down, one scrolls up the other one scrolls down. How can I achieve this? Does this have a name?
See example: https://lifeathome.ikea.com/virtualgreenhouse/
I think you can add transform: translateY(-someHeight) to the column that should scroll to the opposite direction on scroll event
Related
I'm sorry, but I can't get this working:
Scroll down the page to a certain position. Then pause scrolling and animate something. After that scroll down to the bottom of the page.
How do I make Skrollr scroll the end of the page without feeding absolute values to it?
I know the pausing demo, but that works with sections that always fill the whole window. But my section that follows the animated part is larger than that so I can't just say: change its position from -100% to 0% or something like that.
I have made a window in which I will be having two groups/panels and some buttons in between them. I want to code the resizing behavior in a way that when the window expands, the two panels increase their widths while keeping the distance between them constant.
Please see this mockup:
As you see above, I want the 'Local' and 'Server' Panels to resize while keeping the distance in between them same. If I use anchors (Top+Left+Right+Bottom), the left panel will overlap the right one and the right's width one will go out of the window. I want them to share the increased width of the window equally.
As for the buttons in between, I have kept ancors as Top only. By removing Left anchor from button, it automatically places itself in the center of the window when window is expanded, which is just the way I want it to be.
Any ideas how to manage resizing of panels?
Thanks.
Use the TableLayoutPanel control.
First add the TableLayout to the Form and set its Dock() property to Fill.
Next you'll need to setup 3 columns and two rows. Add the two buttons to the middle column with each one is in its own row. Afterwards, setup the column values so they are like this:
Leave the rows at 50% on both.
Now add your two GroupBoxes to the 1st and 3rd columns in the 1st row.
For both GroupBoxes, set Dock() to Fill, and RowSpan() to 2.
For the top Button, turn on only the Bottom Anchor.
For the bottom Button, turn only the Top Anchor.
For the TableLayoutPanel, set Padding() to 5,5,5,5.
Here is what it looked like when I was all done:
Resize the window and observe how the controls behave...
I need your help with a javascript.
The status quo:
I am making a website, that kind of functions like a slide show:
Each slide consists of a header, an image and a little text. Underneath the text comes a little arrow that points down. When you click it you should scroll down to the next slide. When it scrolls down it should fade in the next header.
You can find what I've got so far here:
http://jsfiddle.net/singue/mjvky
<script type="text/javascript">
The problem:
Whenever the arrow is clicked it sometimes does and sometimes doesn't scroll to the desired div. It seems pretty random.
The other problem is only with the first arrow: I have is when i click it, the next header-, image- and text-div hide but then the third slide slides up, right after the first slide. It then scrolls from the first slide to the second one, but you will see the third one while it scrolls. Why is this happening when the first arrow is being clicked and only then?
Do you have an idea how to make it work?
Thank you very much!
Yves
How to implement a scroller to one of the labels before reaching the top of the screen has remained at the top, and the text scrolls from another label beyond the limits of the screen, such as in instagramm, except instead of photos text from the second label
Scroll View
scroller to one of the labels before reaching the top of the screen has remained at the top, and the text scrolls from another label beyond the limits of the screen,
http://www.youtube.com/watch?v=mws6Zbq_y6c
Darwich
I'm trying to create a timeline control in Cocoa. This is what I am trying to achieve. It's basically a standard timeline design.
However, I don't know which approach to take. The problem lies with the top ruler, the left track list and the bottom audio waveform display. These three parts need to always be visible and 'stick' to the edges. The ruler and audio waveform should only scroll horizontally, while the track list on the left should only scroll vertically.
For the top ruler, NSRulerView seems appropriate since it's just a ruler.
For the left view and the bottom view I don't know which route to take. I've played with using a wide vertical NSRulerView for the track list. This works but creates additional problems. For example: the top ruler appears above the track list.
I've composed four options so far:
Forget NSRulerView and draw everything custom in the document view. This seems feasible but sidesteps built in NSRulerView functions. Also, I need to find a way to shorten the scrollbars so they don't overlap the side and top views.
Use NSRulerViews for the top and left side. The bottom side will then probably be drawn manually in the document view.
Place the left view outside the scrollview and manually scroll it up and down by linking it to the main scroll view. Use NSRulerView for the top, manually draw audio waveform in document view.
An NSScrollView embedded in another NSScrollView. The outer handles horizontal scrolling, the inner scroll view handles vertical scrolling. Possible I think, but it seems hacky.
So my question boils down to: Which route to take?. Can anyone shed some light on this issue and point me in the right direction?
What I understand:
You want a view to the left of an NSScrollView which scrolls vertically with the NSScrollView while ignoring horizontal scrolling.
You want a view below an NSScrollView which scrolls horizontally with the NSScrollView while ignoring vertical scrolling.
You want rulers.
To achieve this task:
Use 3 separate scroll views which do not overlap and donot inherit one another.
Activate rulers in whichever view(s) you would like them to appear.
Synchronize the scroll views (so that when one scrolls, the other scrolls accordingly).
How to synchronize scroll views is in the help. See User Experience > Controls > Scroll View Programming Guide for Mac > Synchronizing Scroll Views. This is also indirectly linked in the header of the help guide for NSScrollView.
If you want the three scroll views to be contained within an NSSplitView for resizing simplicity, then a fourth view must be added to consume the unused corner (good place to put controls). Since an NSSplitView can only be split vertically or horizontally, you will have to create an NSSplitView containing 2 split views with each of those split views containing 2 views that you actually see (splitting in one direction and then the other). The resizing of the split views will have to be synchronized in a manner much like the scrolling is synchronized to retain a straight cross of all four views.