Image position in image-keyboard-response plugin #2049
-
Hi all, I want to be able to position my image on the screen at a desired location. The stimulus is also a function. How can I control its position and size on the screen? stimulus: function(){ Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi @fspinar, there's some info about how to do this on the jsPsych Controlling Visual Appearance docs page. You can add CSS rules to your file (by adding them inside <style> tags on your HTML page, or linking to an external CSS file). You can use the stimulus element's ID to create a CSS selector. In the image-keyboard-response plugin, the stimulus ID is "jspsych-image-keyboard-response-stimulus", so you could add this to your HTML file: <style>#jspsych-image-keyboard-response-stimulus { <your CSS position rules here> }</style> And if you're using jsPsych v6.3.0+, then you can use the |
Beta Was this translation helpful? Give feedback.
Hi @fspinar, there's some info about how to do this on the jsPsych Controlling Visual Appearance docs page. You can add CSS rules to your file (by adding them inside <style> tags on your HTML page, or linking to an external CSS file). You can use the stimulus element's ID to create a CSS selector. In the image-keyboard-response plugin, the stimulus ID is "jspsych-image-keyboard-response-stimulus", so you could add this to your HTML file:
And if you're using jsPsych v6.3.0+, then you can use the
css_classes
parameter, which allows you to change the CSS on a trial-by-trial basis. There are some examp…