css - How to set onsenui popover max width and max height -
i'm using onsenui2 (in monaca) without framework (pure js , jquery).
a popover under button doesn't open wide enough , therefore looks bad.
i want set wider , shorter. how restrict height, , allow width grow?
for popover on device, had change topleft
different location, , change width
. want done dynamically. how?
here's an example codepen vue-onsenui, (i think) it's same question onsenui popover.
html:
<v-ons-button @click="showpopover($event, 'up')" style="align-self: center">pop up</v-ons-button> <v-ons-popover cancelable :visible.sync="popovervisible" :target="popovertarget" :direction="popoverdirection" :cover-target="covertarget" > <p style="text-align: center">a lot of text tiny little popover. want <strong>change width </strong><p /> please note want make changes margins popover has. how do that? </p> </v-ons-popover>
javascript
new vue({ el: '#app', template: '#main', data() { return { popovervisible: false, popovertarget: null, popoverdirection: 'up', covertarget: false }; }, methods: { showpopover(event, direction, covertarget = false) { this.popovertarget = event; this.popoverdirection = direction; this.covertarget = covertarget; this.popovervisible = true; } } });
css:
.popover__content { width: 550px; }
Comments
Post a Comment